recovery

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = func(_ context.Context, client *jet.Client, name string, request any, err any) error {
	service := "unknown"
	if client != nil {
		service = client.GetService()
	}
	return fmt.Errorf("service: %s, name: %s, request: %v, error: %v", service, name, request, err)
}

Functions

func New

func New(opts ...Option) jet.Middleware

Types

type HandlerFunc

type HandlerFunc func(ctx context.Context, client *jet.Client, name string, request any, err any) error

type Option

type Option func(*options)

func Handler

func Handler(h HandlerFunc) Option

Jump to

Keyboard shortcuts

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