Movatterモバイル変換


[0]ホーム

URL:


healthsdk

package
v2.23.0Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:13Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

typeAccessURLReport

type AccessURLReport struct {BaseReport// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool   `json:"healthy"`AccessURLstring `json:"access_url"`Reachablebool   `json:"reachable"`StatusCodeint    `json:"status_code"`HealthzResponsestring `json:"healthz_response"`}

AccessURLReport shows the results of performing a HTTP_GET to the /healthz endpoint through the configured access URL.

typeAgentNetcheckReportadded inv2.15.0

type AgentNetcheckReport struct {BaseReportNetInfo    *tailcfg.NetInfo `json:"net_info"`InterfacesInterfacesReport `json:"interfaces"`}

@typescript-ignore AgentNetcheckReport

typeBaseReportadded inv2.11.0

type BaseReport struct {Error     *string          `json:"error,omitempty"`Severityhealth.Severity  `json:"severity" enums:"ok,warning,error"`Warnings  []health.Message `json:"warnings"`Dismissedbool             `json:"dismissed"`}

BaseReport holds fields common to various health reports.

func (*BaseReport)Summarizeadded inv2.11.0

func (b *BaseReport) Summarize(prefix, docsURLstring) []string

Summarize returns a list of strings containing the errors and warnings of BaseReport, if present.All strings are prefixed with prefix.

typeClientNetcheckReportadded inv2.13.0

type ClientNetcheckReport struct {DERPDERPHealthReport `json:"derp"`InterfacesInterfacesReport `json:"interfaces"`}

@typescript-ignore ClientNetcheckReport

typeDERPHealthReport

type DERPHealthReport struct {BaseReport// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool                      `json:"healthy"`Regions      map[int]*DERPRegionReport `json:"regions"`Netcheck     *netcheck.Report          `json:"netcheck,omitempty"`NetcheckErr  *string                   `json:"netcheck_err,omitempty"`NetcheckLogs []string                  `json:"netcheck_logs"`}

DERPHealthReport includes health details of each configured DERP/STUN region.

typeDERPNodeReport

type DERPNodeReport struct {// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool             `json:"healthy"`Severityhealth.Severity  `json:"severity" enums:"ok,warning,error"`Warnings []health.Message `json:"warnings"`Error    *string          `json:"error,omitempty"`Node *tailcfg.DERPNode `json:"node"`ServerInfoderp.ServerInfoMessage `json:"node_info"`CanExchangeMessagesbool                   `json:"can_exchange_messages"`RoundTripPingstring                 `json:"round_trip_ping"`RoundTripPingMsint                    `json:"round_trip_ping_ms"`UsesWebsocketbool                   `json:"uses_websocket"`ClientLogs          [][]string             `json:"client_logs"`ClientErrs          [][]string             `json:"client_errs"`STUNSTUNReport `json:"stun"`}

DERPHealthReport includes health details of a single node in a single region.

typeDERPRegionReport

type DERPRegionReport struct {// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool                `json:"healthy"`Severityhealth.Severity     `json:"severity" enums:"ok,warning,error"`Warnings    []health.Message    `json:"warnings"`Error       *string             `json:"error,omitempty"`Region      *tailcfg.DERPRegion `json:"region"`NodeReports []*DERPNodeReport   `json:"node_reports"`}

DERPHealthReport includes health details of each node in a single region.

typeDatabaseReport

type DatabaseReport struct {BaseReport// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool   `json:"healthy"`Reachablebool   `json:"reachable"`Latencystring `json:"latency"`LatencyMSint64  `json:"latency_ms"`ThresholdMSint64  `json:"threshold_ms"`}

DatabaseReport shows the results of pinging the configured database.Conn.

typeHealthClient

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

@typescript-ignore HealthClient

func (*HealthClient)DebugHealth

func (c *HealthClient) DebugHealth(ctxcontext.Context) (HealthcheckReport,error)

func (*HealthClient)HealthSettings

func (c *HealthClient) HealthSettings(ctxcontext.Context) (HealthSettings,error)

func (*HealthClient)PutHealthSettings

func (c *HealthClient) PutHealthSettings(ctxcontext.Context, settingsHealthSettings)error

typeHealthSection

type HealthSectionstring
const (HealthSectionDERPHealthSection = "DERP"HealthSectionAccessURLHealthSection = "AccessURL"HealthSectionWebsocketHealthSection = "Websocket"HealthSectionDatabaseHealthSection = "Database"HealthSectionWorkspaceProxyHealthSection = "WorkspaceProxy"HealthSectionProvisionerDaemonsHealthSection = "ProvisionerDaemons")

If you add another const below, make sure to add it to HealthSections!

typeHealthSettings

type HealthSettings struct {DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`}

typeHealthcheckReport

type HealthcheckReport struct {// Time is the time the report was generated at.Timetime.Time `json:"time" format:"date-time"`// Healthy is true if the report returns no errors.// Deprecated: use `Severity` insteadHealthybool `json:"healthy"`// Severity indicates the status of Coder health.Severityhealth.Severity `json:"severity" enums:"ok,warning,error"`DERPDERPHealthReport         `json:"derp"`AccessURLAccessURLReport          `json:"access_url"`WebsocketWebsocketReport          `json:"websocket"`DatabaseDatabaseReport           `json:"database"`WorkspaceProxyWorkspaceProxyReport     `json:"workspace_proxy"`ProvisionerDaemonsProvisionerDaemonsReport `json:"provisioner_daemons"`// The Coder version of the server that the report was generated on.CoderVersionstring `json:"coder_version"`}

HealthcheckReport contains information about the health status of a Coder deployment.

func (*HealthcheckReport)Summarizeadded inv2.11.0

func (r *HealthcheckReport) Summarize(docsURLstring) []string

Summarize returns a summary of all errors and warnings of components of HealthcheckReport.

typeInterfaceadded inv2.13.0

type Interface struct {Namestring   `json:"name"`MTUint      `json:"mtu"`Addresses []string `json:"addresses"`}

@typescript-ignore Interface

typeInterfacesReportadded inv2.13.0

type InterfacesReport struct {BaseReportInterfaces []Interface `json:"interfaces"`}

@typescript-ignore InterfacesReport

funcRunInterfacesReportadded inv2.13.0

func RunInterfacesReport() (InterfacesReport,error)

typeProvisionerDaemonsReport

type ProvisionerDaemonsReport struct {BaseReportItems []ProvisionerDaemonsReportItem `json:"items"`}

ProvisionerDaemonsReport includes health details of each connected provisioner daemon.

typeProvisionerDaemonsReportItem

type ProvisionerDaemonsReportItem struct {codersdk.ProvisionerDaemon `json:"provisioner_daemon"`Warnings                   []health.Message `json:"warnings"`}

typeSTUNReport

type STUNReport struct {EnabledboolCanSTUNboolError   *string}

STUNReport contains information about a given node's STUN capabilities.

typeUpdateHealthSettings

type UpdateHealthSettings struct {DismissedHealthchecks []HealthSection `json:"dismissed_healthchecks"`}

typeWebsocketReport

type WebsocketReport struct {// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool `json:"healthy"`BaseReportBodystring `json:"body"`Codeint    `json:"code"`}

WebsocketReport shows if the configured access URL allows establishing WebSocket connections.

typeWorkspaceProxyReport

type WorkspaceProxyReport struct {// Healthy is deprecated and left for backward compatibility purposes, use `Severity` instead.Healthybool `json:"healthy"`BaseReportWorkspaceProxiescodersdk.RegionsResponse[codersdk.WorkspaceProxy] `json:"workspace_proxies"`}

WorkspaceProxyReport includes health details of each connected workspace proxy.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp