Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(r *teapot.Router, h RouteHandlers)
RegisterRoutes registers all health check routes on r. When metadata or rootFS is nil (e.g. CLI route listing), plain 200 fallbacks are used.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the /health, /health/ready, and /health/live endpoints.
func New ¶
func New(metadata Pinger, rootFS billy.Filesystem) *Handler
New creates a Handler. metadata and rootFS are used for readiness probes.
func (*Handler) HandleHealth ¶
HandleHealth returns a JSON summary of all component statuses. HTTP 200 when everything is healthy; 503 when one or more parts are degraded.
func (*Handler) HandleLive ¶
HandleLive is a liveness probe: always 200 if the process is reachable and not deadlocked. Kept as /healthz alias for backwards compatibility with Docker health checks and the performance test wait loop.
func (*Handler) HandleReady ¶
HandleReady is a readiness probe: 200 when BoltDB and storage are accessible, 503 otherwise. Used by load balancers and orchestrators to gate traffic.