httpevents

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(handler http.Handler) http.Handler

NewHandler wraps the HTTP handler and returns a new handler which logs all requests with the default logger.

func NewHandlerWith

func NewHandlerWith(logger *events.Logger, handler http.Handler) http.Handler

NewHandlerWith wraps the HTTP handler and returns a new handler which logs all requests with logger.

Panics from handler are intercepted and trigger a 500 response if no response header was sent yet. The panic is not slienced tho and is propagated to the parent handler.

func NewTransport

func NewTransport(roundTripper http.RoundTripper) http.RoundTripper

NewTransportWith wraps roundTripper and returns a new transport which logs all submitted requests with the default logger.

func NewTransportWith

func NewTransportWith(logger *events.Logger, roundTripper http.RoundTripper) http.RoundTripper

NewTransportWith wraps roundTripper and returns a new transport which logs all submitted requests with logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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