middleware

package
v0.0.0-...-c497fbf Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CorrelationIDKey = "x-correlation-id"

Variables

This section is empty.

Functions

func CORSHandler

func CORSHandler(handler http.Handler) http.Handler

func FromContext

func FromContext(ctx context.Context, fallback *zap.Logger) *zap.Logger

FromContext extracts the logger with correlation ID from context. Falls back to a default logger if not found.

func HTTPLogger

func HTTPLogger(logger *zap.Logger) func(http.Handler) http.Handler

func InjectLogger

func InjectLogger(ctx context.Context, logger *zap.Logger) context.Context

InjectLogger injects a logger into the context.

func UnaryLogger

func UnaryLogger(logger *zap.Logger) grpc.UnaryServerInterceptor

func UnaryRecovery

func UnaryRecovery(logger *zap.Logger) grpc.UnaryServerInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

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