Documentation
¶
Overview ¶
Package health provides readiness state tracking and HTTP health check handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker tracks the readiness state of the platform. It is safe for concurrent use.
func (*Checker) LivenessHandler ¶
func (*Checker) LivenessHandler() http.HandlerFunc
LivenessHandler returns an http.HandlerFunc that always responds 200 OK. Use this for K8s livenessProbe (/healthz).
func (*Checker) ReadinessHandler ¶
func (c *Checker) ReadinessHandler() http.HandlerFunc
ReadinessHandler returns an http.HandlerFunc that responds 200 when ready and 503 when starting or draining. Use this for K8s readinessProbe (/readyz).
func (*Checker) SetDraining ¶
func (c *Checker) SetDraining()
SetDraining transitions to the Draining state.
Click to show internal directories.
Click to hide internal directories.