middleware

package
v0.0.0-...-2942e7d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogWrap

func LogWrap(logger, accessLogger lager.Logger, loggableHandlerFunc LoggableHandlerFunc) http.HandlerFunc

func RecordLatency

func RecordLatency(f http.HandlerFunc, emitter Emitter) http.HandlerFunc

func RecordRequestCount

func RecordRequestCount(handler http.Handler, emitter Emitter) http.HandlerFunc

Types

type Emitter

type Emitter interface {
	IncrementRequestCounter(delta int)
	UpdateLatency(latency time.Duration)
}

type LoggableHandlerFunc

type LoggableHandlerFunc func(logger lager.Logger, w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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