Documentation ¶
Index ¶
- Variables
- type AccessURLReport
- type DERPHealthReport
- type DERPNodeReport
- type DERPRegionReport
- type DatabaseReport
- type HealthClient
- type HealthSection
- type HealthSettings
- type HealthcheckReport
- type ProvisionerDaemonsReport
- type ProvisionerDaemonsReportItem
- type STUNReport
- type UpdateHealthSettings
- type WebsocketReport
- type WorkspaceProxyReport
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AccessURLReport ¶
type AccessURLReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []health.Message `json:"warnings"` Dismissed bool `json:"dismissed"` AccessURL string `json:"access_url"` Reachable bool `json:"reachable"` StatusCode int `json:"status_code"` HealthzResponse string `json:"healthz_response"` Error *string `json:"error"` }
type DERPHealthReport ¶
type DERPHealthReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []health.Message `json:"warnings"` Dismissed bool `json:"dismissed"` Regions map[int]*DERPRegionReport `json:"regions"` Netcheck *netcheck.Report `json:"netcheck"` NetcheckErr *string `json:"netcheck_err"` NetcheckLogs []string `json:"netcheck_logs"` Error *string `json:"error"` }
type DERPNodeReport ¶
type DERPNodeReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []health.Message `json:"warnings"` Node *tailcfg.DERPNode `json:"node"` ServerInfo derp.ServerInfoMessage `json:"node_info"` CanExchangeMessages bool `json:"can_exchange_messages"` RoundTripPing string `json:"round_trip_ping"` RoundTripPingMs int `json:"round_trip_ping_ms"` UsesWebsocket bool `json:"uses_websocket"` ClientLogs [][]string `json:"client_logs"` ClientErrs [][]string `json:"client_errs"` Error *string `json:"error"` STUN STUNReport `json:"stun"` }
type DERPRegionReport ¶
type DERPRegionReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []health.Message `json:"warnings"` Region *tailcfg.DERPRegion `json:"region"` NodeReports []*DERPNodeReport `json:"node_reports"` Error *string `json:"error"` }
type DatabaseReport ¶
type DatabaseReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []health.Message `json:"warnings"` Dismissed bool `json:"dismissed"` Reachable bool `json:"reachable"` Latency string `json:"latency"` LatencyMS int64 `json:"latency_ms"` ThresholdMS int64 `json:"threshold_ms"` Error *string `json:"error"` }
type HealthClient ¶
type HealthClient struct {
// contains filtered or unexported fields
}
@typescript-ignore HealthClient
func New ¶
func New(c *codersdk.Client) *HealthClient
func (*HealthClient) DebugHealth ¶
func (c *HealthClient) DebugHealth(ctx context.Context) (HealthcheckReport, error)
func (*HealthClient) HealthSettings ¶
func (c *HealthClient) HealthSettings(ctx context.Context) (HealthSettings, error)
func (*HealthClient) PutHealthSettings ¶
func (c *HealthClient) PutHealthSettings(ctx context.Context, settings HealthSettings) error
type HealthSection ¶
type HealthSection string
const ( HealthSectionDERP HealthSection = "DERP" HealthSectionAccessURL HealthSection = "AccessURL" HealthSectionWebsocket HealthSection = "Websocket" HealthSectionDatabase HealthSection = "Database" HealthSectionWorkspaceProxy HealthSection = "WorkspaceProxy" HealthSectionProvisionerDaemons HealthSection = "ProvisionerDaemons" )
If you add another const below, make sure to add it to HealthSections!
type HealthSettings ¶
type HealthSettings struct {
DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`
}
type HealthcheckReport ¶
type HealthcheckReport struct { // Time is the time the report was generated at. Time time.Time `json:"time" format:"date-time"` // Healthy is true if the report returns no errors. // Deprecated: use `Severity` instead Healthy bool `json:"healthy"` // Severity indicates the status of Coder health. Severity health.Severity `json:"severity" enums:"ok,warning,error"` // FailingSections is a list of sections that have failed their healthcheck. FailingSections []HealthSection `json:"failing_sections"` DERP DERPHealthReport `json:"derp"` AccessURL AccessURLReport `json:"access_url"` Websocket WebsocketReport `json:"websocket"` Database DatabaseReport `json:"database"` WorkspaceProxy WorkspaceProxyReport `json:"workspace_proxy"` ProvisionerDaemons ProvisionerDaemonsReport `json:"provisioner_daemons"` // The Coder version of the server that the report was generated on. CoderVersion string `json:"coder_version"` }
type ProvisionerDaemonsReportItem ¶
type ProvisionerDaemonsReportItem struct { codersdk.ProvisionerDaemon `json:"provisioner_daemon"` Warnings []health.Message `json:"warnings"` }
type STUNReport ¶
type UpdateHealthSettings ¶
type UpdateHealthSettings struct {
DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`
}
type WebsocketReport ¶
type WebsocketReport struct { // Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead. Healthy bool `json:"healthy"` Severity health.Severity `json:"severity" enums:"ok,warning,error"` Warnings []string `json:"warnings"` Dismissed bool `json:"dismissed"` Body string `json:"body"` Code int `json:"code"` Error *string `json:"error"` }
type WorkspaceProxyReport ¶
type WorkspaceProxyReport struct { Healthy bool `json:"healthy"` Severity health.Severity `json:"severity"` Warnings []health.Message `json:"warnings"` Dismissed bool `json:"dismissed"` Error *string `json:"error"` WorkspaceProxies codersdk.RegionsResponse[codersdk.WorkspaceProxy] `json:"workspace_proxies"` }
Click to show internal directories.
Click to hide internal directories.