http

package
v0.0.0-...-639fd54 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromRequest

func FromRequest(r *http.Request) logevent.Logger

FromRequest is a helper for extracting the logger from an *http.Request.

func NewMiddleware

func NewMiddleware(logger logevent.Logger) func(http.Handler) http.Handler

NewMiddleware generates an HTTP middleware with the given options set.

Types

type Middleware

type Middleware struct {
	// contains filtered or unexported fields
}

Middleware wraps an http.Handler and injects a logevent.Logger in to the context.

func (*Middleware) ServeHTTP

func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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