sitehealth

package
v0.31.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package sitehealth measures published websites independently of their desired deployment state. The core automation schedules probes; browsers only read.

Index

Constants

View Source
const ProbeUserAgent = "MemQL-Site-Health/1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check(context.Context, Site) Observation
}

type Engine

type Engine interface {
	Execute(context.Context, string) (*memql.ExecuteResult, error)
}

type Integration

type Integration struct {
	// contains filtered or unexported fields
}

func (*Integration) Capabilities

func (i *Integration) Capabilities() []memql.IntegrationCapability

func (*Integration) IntegrationName

func (i *Integration) IntegrationName() string

type Observation

type Observation struct {
	SiteID     string    `bun:"site_id" json:"siteId"`
	Hostname   string    `bun:"hostname" json:"hostname"`
	BundleRef  string    `bun:"bundle_ref" json:"bundleRef"`
	CheckedAt  time.Time `bun:"checked_at" json:"checkedAt"`
	State      string    `bun:"state" json:"state"`
	Reason     string    `bun:"reason" json:"reason"`
	HTTPStatus int       `bun:"http_status" json:"httpStatus"`
	DurationMs int64     `bun:"duration_ms" json:"durationMs"`
}

type Prober

type Prober struct {
	Client *http.Client
}

func NewProber

func NewProber(domain, dialAddress, caFile string) (*Prober, error)

dialAddress is deployment-owned, never supplied by a site or a browser. It routes the cluster's own loopback domain through its real ingress, retaining the original Host and TLS server name. Other hosts still use their own DNS.

func (*Prober) Check

func (p *Prober) Check(ctx context.Context, site Site) Observation

type Site

type Site struct {
	ID, Hostname, BundleRef, Status string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址