middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package middleware provides HTTP middleware utilities for chi router.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(middlewares ...func(http.Handler) http.Handler) func(http.Handler) http.Handler

Chain is a helper function to chain multiple middleware.

func DefaultMiddlewareStack

func DefaultMiddlewareStack(router *chi.Mux) error

DefaultMiddlewareStack applies the default middleware stack to a chi router. This includes panic recovery, request logging, CORS, and request ID tracking.

func HealthCheckHandler

func HealthCheckHandler(w http.ResponseWriter, r *http.Request)

HealthCheckHandler handles health check requests.

func ReadinessCheckHandler

func ReadinessCheckHandler(w http.ResponseWriter, r *http.Request)

ReadinessCheckHandler handles readiness check requests.

func Register

func Register(r chi.Router, middlewares ...func(http.Handler) http.Handler)

Register registers middleware with a chi router.

Types

This section is empty.

Jump to

Keyboard shortcuts

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