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)
}

    go:generate counterfeiter -o fakes/fake_emitter.go . Emitter

    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.