middlewares

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string = "development" // default value, overridden at build time

Functions

func MiddlewareChain

func MiddlewareChain(routeName string, next http.Handler) http.Handler

MiddlewareChain Is the standard middleware chain to apply to all routes. Change this to add a middleware for all routes

func PrometheusInstrumentation

func PrometheusInstrumentation(name string, next http.Handler) http.HandlerFunc

PrometheusInstrumentation This middle ware is sensitive to order in the middleware chain. For a close to real timing measurement. It must be as high in the chain as possible, be the first one declared.

func SetupOTelSDK

func SetupOTelSDK(ctx context.Context, config config.Config) (func(context.Context) error, error)

SetupOTelSDK initializes OpenTelemetry with the OTLP exporter for tracing.

func VersionHeaderResponseMiddleware

func VersionHeaderResponseMiddleware(next http.Handler) http.HandlerFunc

VersionHeaderResponseMiddleware sets an "x-version" header to the response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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