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
func NewTracingMW ¶ added in v0.1.13
func NewTracingMW(tr opentracing.Tracer, options ...MWOption) alice.Constructor
NewTracingMW 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.
type MWOption ¶ added in v0.1.13
type MWOption func(*mwOptions)
MWOption contols the behavior of the Middleware.
Click to show internal directories.
Click to hide internal directories.