Documentation ¶
Overview ¶
Package healthz implements basic http server health checking. Usage:
import _ "healthz" registers a handler on the path '/healthz', that serves 200s
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHealthz ¶ added in v0.15.0
func DefaultHealthz(checks ...HealthzChecker)
DefaultHealthz installs the default healthz check to the http.DefaultServeMux.
func InstallHandler ¶
func InstallHandler(mux mux, checks ...HealthzChecker)
InstallHandler registers a handler for health checking on the path "/healthz" to mux.
Types ¶
type HealthzChecker ¶ added in v0.15.0
HealthzChecker is a named healthz check.
var PingHealthz HealthzChecker = ping{}
PingHealthz returns true automatically when checked
func NamedCheck ¶ added in v0.15.0
func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker
NamedCheck returns a health checker for the given name and function.
Click to show internal directories.
Click to hide internal directories.