middleware

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 6 Imported by: 3

README

a collection of fasthttp middleware

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(log *logger.Logger, handler fasthttp.RequestHandler) fasthttp.RequestHandler

Logger wraps a fasthttp.RequestHandler to add request logging to specified logger.

func PanicHandler added in v0.1.3

func PanicHandler(log *logger.Logger, ctx *fasthttp.RequestCtx, i interface{})

PanicHandler will handle the result of a panic during fasthttp.RequestHandler, logging a stracktrace and contents of the recovered interface to the given logger at error level.

func Recovery

func Recovery(log *logger.Logger, handler fasthttp.RequestHandler) fasthttp.RequestHandler

Recovery wraps a fasthttp.RequestHandler to add panic recovery and handling via HTTPPanicHandler().

Types

This section is empty.

Jump to

Keyboard shortcuts

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