bricks: github.com/pace/bricks/maintenance/health Index | Files | Directories

package health

import "github.com/pace/bricks/maintenance/health"

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

Index

Package Files

health.go

func HandlerLiveness Uses

func HandlerLiveness() http.Handler

HandlerLiveness returns the liveness handler that always return OK and 200

func HandlerReadiness Uses

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 Uses

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

Directories

PathSynopsis
servicehealthcheck

Package health imports 4 packages (graph) and is imported by 1 packages. Updated 2020-07-21. Refresh now. Tools for package owners.