Back to

Package health

Latest Go to latest

The latest major version is .

Published: 5 days ago | License: MIT | Module:


Package health implements simple checks for readiness and liveness that will be invoked by the loadbalancer frequently


func HandlerLiveness

func HandlerLiveness() http.Handler

HandlerLiveness returns the liveness handler that always return OK and 200

func HandlerReadiness

func HandlerReadiness() http.Handler

HandlerReadiness returns the readiness handler. This handler can be configured with ReadinessCheck(func(http.ResponseWriter,*http.Request)), the default behavior is a liveness check

func SetCustomReadinessCheck

func SetCustomReadinessCheck(check func(http.ResponseWriter, *http.Request))

ReadinessCheck allows to set a different function for the readiness check. The default readiness check is the same as the liveness check and does always return OK

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier