middlewares

package
v2.0.0-alpha5+incompat... Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(ctx context.Context, middleware string, middlewareType string) logrus.FieldLogger

GetLogger creates a logger configured with the middleware fields.

Types

type HTTPHandlerSwitcher

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

HTTPHandlerSwitcher allows hot switching of http.ServeMux

func NewHandlerSwitcher

func NewHandlerSwitcher(newHandler http.Handler) (hs *HTTPHandlerSwitcher)

NewHandlerSwitcher builds a new instance of HTTPHandlerSwitcher

func (*HTTPHandlerSwitcher) GetHandler

func (h *HTTPHandlerSwitcher) GetHandler() (newHandler http.Handler)

GetHandler returns the current http.ServeMux

func (*HTTPHandlerSwitcher) ServeHTTP

func (h *HTTPHandlerSwitcher) ServeHTTP(rw http.ResponseWriter, req *http.Request)

func (*HTTPHandlerSwitcher) UpdateHandler

func (h *HTTPHandlerSwitcher) UpdateHandler(newHandler http.Handler)

UpdateHandler safely updates the current http.ServeMux with a new one

type Stateful

Stateful interface groups all http interfaces that must be implemented by a stateful middleware (ie: recorders)

Directories

Path Synopsis
Package headers Middleware based on https://github.com/unrolled/secure.
Package headers Middleware based on https://github.com/unrolled/secure.

Jump to

Keyboard shortcuts

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