Documentation ¶
Overview ¶
Package health provides functions for reporting the health status of individual components in the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHealthCheck ¶
AddHealthCheck adds a new named component to the health check results.
func AddReadyCheck ¶
func AddReadyCheck(fn ReadyFunc)
AddReadyCheck adds a new ReadyFunc to the readiness check. The readiness endpoint returns an error if one of the functions returns false.
func CheckKubernetesAPI ¶
CheckKubernetesAPI returns a function that returns a non-nil error when the connection to the Kubernetes cluster is deemed unhealthy.
Types ¶
type Check ¶
type Check struct { Name string `json:"name"` Healthy bool `json:"healthy"` Message string `json:"message,omitempty"` }
The Check type describes the health of an individual component.
type Health ¶
type Health struct { Application string `json:"application,omitempty"` Version string `json:"version,omitempty"` Compiled time.Time `json:"compiled,omitempty"` Description string `json:"description,omitempty"` Healthy bool `json:"healthy"` Checks []Check `json:"checks,omitempty"` }
The Health type contains fields that describe the health of an application and its components.
Click to show internal directories.
Click to hide internal directories.