healthcheck

package
v0.23.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessURLOptions added in v0.23.0

type AccessURLOptions struct {
	AccessURL *url.URL
	Client    *http.Client
}

type AccessURLReport added in v0.23.0

type AccessURLReport struct {
	Healthy         bool
	Reachable       bool
	StatusCode      int
	HealthzResponse string
	Error           error
}

func (*AccessURLReport) Run added in v0.23.0

func (r *AccessURLReport) Run(ctx context.Context, opts *AccessURLOptions)

type DERPNodeReport

type DERPNodeReport struct {
	Healthy bool              `json:"healthy"`
	Node    *tailcfg.DERPNode `json:"node"`

	ServerInfo          derp.ServerInfoMessage `json:"node_info"`
	CanExchangeMessages bool                   `json:"can_exchange_messages"`
	RoundTripPing       time.Duration          `json:"round_trip_ping"`
	UsesWebsocket       bool                   `json:"uses_websocket"`
	ClientLogs          [][]string             `json:"client_logs"`
	ClientErrs          [][]error              `json:"client_errs"`
	Error               error                  `json:"error"`

	STUN DERPStunReport `json:"stun"`
	// contains filtered or unexported fields
}

func (*DERPNodeReport) Run

func (r *DERPNodeReport) Run(ctx context.Context)

type DERPRegionReport

type DERPRegionReport struct {
	Healthy bool `json:"healthy"`

	Region      *tailcfg.DERPRegion `json:"region"`
	NodeReports []*DERPNodeReport   `json:"node_reports"`
	Error       error               `json:"error"`
	// contains filtered or unexported fields
}

func (*DERPRegionReport) Run

func (r *DERPRegionReport) Run(ctx context.Context)

type DERPReport

type DERPReport struct {
	Healthy bool `json:"healthy"`

	Regions map[int]*DERPRegionReport `json:"regions"`

	Netcheck     *netcheck.Report `json:"netcheck"`
	NetcheckErr  error            `json:"netcheck_err"`
	NetcheckLogs []string         `json:"netcheck_logs"`

	Error error `json:"error"`
	// contains filtered or unexported fields
}

func (*DERPReport) Run

func (r *DERPReport) Run(ctx context.Context, opts *DERPReportOptions)

type DERPReportOptions

type DERPReportOptions struct {
	DERPMap *tailcfg.DERPMap
}

type DERPStunReport

type DERPStunReport struct {
	Enabled bool
	CanSTUN bool
	Error   error
}

type Report

type Report struct {
	// Time is the time the report was generated at.
	Time time.Time `json:"time"`
	// Healthy is true if the report returns no errors.
	Healthy bool `json:"pass"`

	DERP      DERPReport      `json:"derp"`
	AccessURL AccessURLReport `json:"access_url"`
}

func Run

func Run(ctx context.Context, opts *ReportOptions) (*Report, error)

type ReportOptions

type ReportOptions struct {
	// TODO: support getting this over HTTP?
	DERPMap   *tailcfg.DERPMap
	AccessURL *url.URL
	Client    *http.Client
}

type WebsocketReport

type WebsocketReport struct{}

func (*WebsocketReport) Run added in v0.23.0

func (*WebsocketReport) Run(ctx context.Context, accessURL *url.URL)

Jump to

Keyboard shortcuts

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