Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHealthCheckMW ¶
func NewHealthCheckMW(basePath string, checker HealthChecker) alice.Constructor
NewHealthCheckMW creates a new health check middleware at the specified path
Types ¶
type HealthCheck ¶
type HealthCheck struct {
// contains filtered or unexported fields
}
HealthCheck is a middleware that serves healthcheck information
func NewHealthCheck ¶
func NewHealthCheck(basePath string, checker HealthChecker, next http.Handler) *HealthCheck
NewHealthCheck creates a new health check middleware at the specified path
func (*HealthCheck) ServeHTTP ¶
func (h *HealthCheck) ServeHTTP(rw http.ResponseWriter, r *http.Request)
ServeHTTP is the middleware interface implementation
type HealthChecker ¶
type HealthChecker func() error
HealthChecker is executed to verify health of the service.
Click to show internal directories.
Click to hide internal directories.