health

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SeverityOK      Severity = "ok"
	SeverityWarning Severity = "warning"
	SeverityError   Severity = "error"

	// CodeUnknown is a catch-all health code when something unexpected goes wrong (for example, a panic).
	CodeUnknown Code = "EUNKNOWN"

	CodeProxyUpdate Code = "EWP01"
	CodeProxyFetch  Code = "EWP02"
	// CodeProxyVersionMismatch is no longer used as it's no longer a critical
	// error.
	// CodeProxyVersionMismatch Code = "EWP03"
	CodeProxyUnhealthy Code = "EWP04"

	CodeDatabasePingFailed Code = "EDB01"
	CodeDatabasePingSlow   Code = "EDB02"

	CodeWebsocketDial Code = "EWS01"
	CodeWebsocketEcho Code = "EWS02"
	CodeWebsocketMsg  Code = "EWS03"

	CodeAccessURLNotSet  Code = "EACS01"
	CodeAccessURLInvalid Code = "EACS02"
	CodeAccessURLFetch   Code = "EACS03"
	CodeAccessURLNotOK   Code = "EACS04"

	CodeDERPNodeUsesWebsocket Code = `EDERP01`
	CodeDERPOneNodeUnhealthy  Code = `EDERP02`

	CodeProvisionerDaemonsNoProvisionerDaemons     Code = `EPD01`
	CodeProvisionerDaemonVersionMismatch           Code = `EPD02`
	CodeProvisionerDaemonAPIMajorVersionDeprecated Code = `EPD03`
)

Variables

This section is empty.

Functions

func Errorf

func Errorf(code Code, msg string, args ...any) *string

Errorf is a convenience function for returning a stringly-typed version of a Message.

Types

type Code

type Code string

Code is a stable identifier used to link to documentation. @typescript-generate Code

type Message

type Message struct {
	Code    Code   `json:"code"`
	Message string `json:"message"`
}

@typescript-generate Message

func Messagef

func Messagef(code Code, msg string, args ...any) Message

Messagef is a convenience function for returning a health.Message

func (Message) String

func (m Message) String() string

type Severity

type Severity string

@typescript-generate Severity

func (Severity) Value

func (s Severity) Value() int

Jump to

Keyboard shortcuts

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