recovery

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

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

Recovery 返回一个恢复中间件

Types

type Handler

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

Handler 是恢复处理程序

type Option

type Option func(*options)

Option 是恢复中间件的选项

func WithHandler

func WithHandler(h Handler) 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