httpmidleware

package
v0.0.0-...-3b473a0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware interface {
	// WrapHandler wraps the given HTTP handler for instrumentation.
	WrapHandler(handlerName string, handler http.Handler) http.HandlerFunc
}

Middleware auto instruments net/http HTTP.

func NewMiddleware

func NewMiddleware(reg prometheus.Registerer, buckets []float64) Middleware

NewMiddleware provides HTTP metric Middleware. Passing nil as buckets uses the default buckets.

func NewNopMiddleware

func NewNopMiddleware() Middleware

NewNopMiddleware provides a Middleware which does nothing.

Jump to

Keyboard shortcuts

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