middleware

package
v0.0.0-...-781836f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 7

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