middleware

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestDurationMetric

func NewRequestDurationMetric(originalTransport http.RoundTripper, metric *prometheus.HistogramVec) http.RoundTripper

func NewRequestLogger

func NewRequestLogger(originalTransport http.RoundTripper, logger logger.Logger) http.RoundTripper

func NewTotalRequestCountMetric

func NewTotalRequestCountMetric(originalTransport http.RoundTripper, metric *prometheus.CounterVec) http.RoundTripper

Types

type Func

type Func func(next http.RoundTripper) http.RoundTripper

func RequestDuration

func RequestDuration(appConfig *app.Config, informer logger.Informer) Func

func RequestLogger

func RequestLogger(logger logger.Logger) Func

func TotalRequestCount

func TotalRequestCount(appConfig *app.Config, informer logger.Informer) Func

func (Func) Middleware

func (middleware Func) Middleware(next http.RoundTripper) http.RoundTripper

type Middleware

type Middleware interface {
	Middleware(next http.RoundTripper) http.RoundTripper
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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