middleware

package
v0.0.0-...-053b097 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 10

Documentation

Overview

Package middleware contains some basic middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContextTimeout

func WithContextTimeout(timeout time.Duration) router.Middleware

WithContextTimeout returns a middleware that adds a timeout to the context.

func WithPanicCatcher

func WithPanicCatcher(c *router.Context, next router.Handler)

WithPanicCatcher is a middleware that catches panics, dumps stack trace to logging and returns HTTP 500.

Types

This section is empty.

Jump to

Keyboard shortcuts

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