Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶ added in v0.19.3
func WithLogger(logger *logrus.Logger) func(*ChecksHandler)
Types ¶
type Check ¶
type Check func() error
Check
func DNSProbeCheck ¶
DNSProbeCheck returns a Check that determines whether a service with specified DNS name is reachable or not using net.Resolver's LookupHost method.
type Checker ¶
type Checker interface { AddLiveness(name string, check Check) AddReadiness(name string, check Check) Handler() http.Handler RegisterHandler(mux *http.ServeMux) }
Checker ...
func NewChecksHandler ¶
NewChecksHandler accepts two strings: health and ready paths. These paths will be used for liveness and readiness checks.
type ChecksHandler ¶ added in v0.19.3
type ChecksHandler struct {
// contains filtered or unexported fields
}
func NewChecksHandlerWithOptions ¶ added in v0.19.3
func NewChecksHandlerWithOptions(healthPath, readyPath string, options ...func(*ChecksHandler)) *ChecksHandler
func (*ChecksHandler) AddLiveness ¶ added in v0.19.3
func (ch *ChecksHandler) AddLiveness(name string, check Check)
func (*ChecksHandler) AddReadiness ¶ added in v0.19.3
func (ch *ChecksHandler) AddReadiness(name string, check Check)
func (*ChecksHandler) Handler ¶ added in v0.19.3
func (ch *ChecksHandler) Handler() http.Handler
Handler returns a new http.Handler for the given health checker
func (*ChecksHandler) RegisterHandler ¶ added in v0.19.3
func (ch *ChecksHandler) RegisterHandler(mux *http.ServeMux)
RegisterHandler registers the given health and readiness patterns onto the given http.ServeMux
Click to show internal directories.
Click to hide internal directories.