recovery

package
v2.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 5 Imported by: 164

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(opts ...Option) middleware.Middleware

Recovery is a server middleware that recovers from any panics.

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, req, err interface{}) error

HandlerFunc is recovery handler func.

type Option

type Option func(*options)

Option is recovery option.

func WithHandler

func WithHandler(h HandlerFunc) Option

WithHandler with recovery handler.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger with recovery logger.

Jump to

Keyboard shortcuts

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