httpevents

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

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

NewHandler wraps the HTTP handler and returns a new handler which logs all requests to 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(logger *events.Logger, roundTripper http.RoundTripper) http.RoundTripper

NewTransport 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