recovery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 4 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 returns a recovery middleware.

Types

type Handler

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

Handler is a function that handles a panic.

type Option

type Option func(*options)

Option is a function that configures the middleware.

func WithHandler

func WithHandler(h Handler) Option

WithHandler returns a new Option that sets the handler.

func WithLogger

func WithLogger(logger xlog.Logger) Option

WithLogger returns a new Option that sets the logger.

Jump to

Keyboard shortcuts

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