Documentation
¶
Index ¶
- func Chain(h http.Handler, middleware ...func(http.Handler) http.Handler) http.Handler
- func ClientSessionID(next http.Handler) http.Handler
- func Gzip(next http.Handler) http.Handler
- func Logger(base *slog.Logger) func(http.Handler) http.Handler
- func Logging(next http.Handler) http.Handler
- func Recovery(next http.Handler) http.Handler
- func RequestID(opts ...RequestIDOption) func(http.Handler) http.Handler
- func SecurityHeaders(next http.Handler) http.Handler
- func ShutdownContext(next http.Handler) http.Handler
- func VersionCheck(next http.Handler) http.Handler
- type RequestIDMiddleware
- type RequestIDOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShutdownContext ¶
ShutdownContext is middleware that detects when the base context has been cancelled (indicating server shutdown) and marks the request context accordingly.
This allows handlers to distinguish between client disconnects and server-initiated shutdowns, enabling different logging and cleanup behavior.
Types ¶
type RequestIDMiddleware ¶
type RequestIDOption ¶
type RequestIDOption func(*RequestIDMiddleware)
Click to show internal directories.
Click to hide internal directories.