Documentation ¶
Overview ¶
Package health defines a standard healthcheck response format and expose a function that summarizes registered healthchecks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Healthcheck ¶
Healthcheck calls every registered Healthchecker and summarize their output
func RegisterHealthchecker ¶
func RegisterHealthchecker(name string, f Healthchecker)
RegisterHealthchecker registers a Healthchecker function which will be part of Healthchecks
Types ¶
type Healthchecker ¶
type Healthchecker func() Status
A Healthchecker function is a method returning the Status of the tested service
type Status ¶
type Status struct { // IsEssential determines if the service is essential to the app, which can't // run in case of a failure IsEssential bool // IsHealthy defines whether the service is working or not IsHealthy bool // Details gives informations specific to the service Details interface{} }
Status defines a way to know the health status of a service
Click to show internal directories.
Click to hide internal directories.