middleware

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instrumentation

type Instrumentation struct {
	UseRouteTemplate   bool
	ReqDurationBuckets []float64
	Namespace          string
	Subsystem          string
	Labels             map[string]string
	Registerer         prometheus.Registerer
	// contains filtered or unexported fields
}

Instrumentation implements the mux middleware and contains configuration options

func NewCustomInstrumentation

func NewCustomInstrumentation(useRouteTemplate bool, namespace string, subsystem string, reqDurationBuckets []float64, labels map[string]string, registerer prometheus.Registerer) *Instrumentation

NewCustomInstrumentation returns an instrumentation with custom options

func NewDefaultInstrumentation

func NewDefaultInstrumentation() *Instrumentation

NewDefaultInstrumentation returns an instrumentation with the default options

func (*Instrumentation) Middleware

func (i *Instrumentation) Middleware(next http.Handler) http.Handler

Middleware satisifies the mux middleware interface

Jump to

Keyboard shortcuts

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