middleware

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2017 License: BSD-2-Clause Imports: 5 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Common

func Common(h http.Handler) http.Handler

Common wraps the handler with common middleware to:

* Log requests * Recover from panics. * Add the request id to the context.

func LogRequests added in v0.10.1

func LogRequests(h http.Handler) http.Handler

LogRequests logs the requests to the embedded logger.

func PrefixRequestID added in v0.10.1

func PrefixRequestID(h http.Handler) http.Handler

PrefixRequestID adds the request as a prefix to the log15.Logger.

func WithRequest added in v0.10.1

func WithRequest(h http.Handler) http.Handler

WithRequest adds information about the http.Request to reported errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL