bricks: Index | Files | Directories

package health

import ""

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


Package Files


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



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