Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler wraps an HTTP handler so that a log entry can be generated for request/response stats
func NewHandler ¶
func NewHandler(h http.HandlerFunc, l *lr.Logger) *Handler
NewHandler creates a new Handler instance based on an http.HandlerFunc
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP calls its underlying handler's ServeHTTP method, then calls Log after the handler returns.
ServeHTTP will always consume the request body up to the first error, even if the underlying handler does not.
Click to show internal directories.
Click to hide internal directories.