middleware

package
v0.0.0-...-f3a6a69 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RouterPath = "router-path"

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsMiddleware

type MetricsMiddleware struct {
	// contains filtered or unexported fields
}

Middleware is a handler that exposes prometheus metrics for the number of requests, the latency and the response size, partitioned by status code, method and HTTP path.

type TraceConfig

type TraceConfig struct {
	SkipURLPath []string
}

type Wrapper

type Wrapper func(next http.Handler) http.Handler

func Metrics

func Metrics(name string, buckets ...float64) Wrapper

Metrics returns a new prometheus Middleware handler.

func Trace

func Trace(tracer opentracing.Tracer, cfg TraceConfig) Wrapper

Jump to

Keyboard shortcuts

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