recovery

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

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

Recovery 是从任何紧急情况中恢复的服务器中间件.

Types

type HandlerFunc

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

HandlerFunc 是恢复处理程序函数.

type Option

type Option func(*options)

Option 是恢复选项.

func WithHandler

func WithHandler(h HandlerFunc) Option

WithHandler 与恢复处理程序.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger 使用恢复记录器.

Jump to

Keyboard shortcuts

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