middleware

package
v0.0.0-...-8b83558 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package middleware provides middleware support to the web package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(logger *zerolog.Logger) web.MidHandler

Logger is a middleware that provides request logging and injects request trace ID into the context logger.

func PanicRecovery

func PanicRecovery() web.MidHandler

PanicRecovery is a middleware that provides panic recovery. Logs the panic details, and prevents the application from crashing.

func Timeout

func Timeout(timeout time.Duration) web.MidHandler

Timeout adds a timeout to the request context.

Types

type Handler

type Handler func()

Handler defines the function signature that middleware components will invoke.

Jump to

Keyboard shortcuts

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