http

package
v0.21.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstrumentationMiddleware

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

InstrumentationMiddleware holds necessary metrics to instrument an http.Server and provides necessary behaviors.

func NewInstrumentationMiddleware

func NewInstrumentationMiddleware(reg prometheus.Registerer, buckets []float64) InstrumentationMiddleware

NewInstrumentationMiddleware provides default InstrumentationMiddleware. Passing nil as buckets uses the default buckets.

func NewNopInstrumentationMiddleware

func NewNopInstrumentationMiddleware() InstrumentationMiddleware

NewNopInstrumentationMiddleware provides a InstrumentationMiddleware which does nothing.

Jump to

Keyboard shortcuts

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