Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHealthHandler ¶
func GetHealthHandler(checkers ...Checker) http.HandlerFunc
Types ¶
type Check ¶
type Check struct { Key Key `json:"-"` ComponentId string `json:",omitempty"` ComponentType string `json:",omitempty"` ObservedValue interface{} `json:",omitempty"` ObservedUnit string `json:",omitempty"` Status Status `json:",omitempty"` AffectedEndpoints []string `json:",omitempty"` Time time.Time `json:",omitempty"` Output string `json:",omitempty"` Links map[string]string `json:",omitempty"` }
Check is an individual element of the array returned for a given Checks key.
See: https://inadarei.github.io/rfc-healthcheck/#the-checks-object
type Key ¶
Key provides a composite key denoting the component name and measurement name of a health checks.
See: https://inadarei.github.io/rfc-healthcheck/#the-checks-object
func (Key) MarshalText ¶
func (*Key) UnmarshalText ¶
type Status ¶
type Status int
State indicates whether the service as-a-whole and the individual checks are okay.
These must be organized from least to greatest severity and must be in the same order as the data structure below. (Replace with go-enumeration when it's available.)
func ParseStatus ¶
func (Status) MarshalText ¶
func (Status) StatusCode ¶
func (*Status) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.