Documentation
¶
Index ¶
- func LogFields(r *http.Request, keysAndValues ...interface{}) []interface{}
- func Logger(log *logger.Logger, h http.Handler) http.Handler
- func Metrics(h http.Handler, routeMatcher RouteMatcher) http.Handler
- func Recovery(log *logger.Logger, next http.Handler) http.Handler
- func Tracer(tracer *tracing.Tracer, h http.Handler, routeMatcher RouteMatcher) http.Handler
- func VarzHandler(w http.ResponseWriter, r *http.Request)
- type Error
- type Handler
- type MuxRouteMatcher
- type RouteMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Metrics ¶
func Metrics(h http.Handler, routeMatcher RouteMatcher) http.Handler
Metrics is a handler that collects performance metrics
func VarzHandler ¶
func VarzHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type Error ¶
Error is the message and http status code to return
func BadRequest ¶
BadRequest is a convenience function for returning a bad request error
func InternalServerError ¶
func InternalServerError() *Error
InternalServerError is a convenience function for returning an internal server error
type Handler ¶
type Handler func(w http.ResponseWriter, r *http.Request) *Error
Handler wraps a http handler and deals with responding to errors
type MuxRouteMatcher ¶
MuxRouteMatcher maxes routes for a mux router
type RouteMatcher ¶
RouteMatcher matches routes
Click to show internal directories.
Click to hide internal directories.