recovery

package module
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

README

micro-wrapper-recovery

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultServerHandlerFn = func(ctx context.Context, req server.Request, rsp interface{}, err error) error {
		return errors.BadRequest("", "%v", err)
	}
	DefaultServerSubscriberFn = func(ctx context.Context, req server.Message, err error) error {
		return errors.BadRequest("", "%v", err)
	}
)
View Source
var Hook = NewHook()

Functions

func NewHook added in v3.9.0

func NewHook(opts ...Option) *hook

Types

type Option added in v3.8.3

type Option func(*Options)

func ServerHandlerFunc added in v3.9.0

func ServerHandlerFunc(fn func(context.Context, server.Request, interface{}, error) error) Option

func ServerSubscriberFunc added in v3.9.0

func ServerSubscriberFunc(fn func(context.Context, server.Message, error) error) Option

type Options added in v3.8.3

type Options struct {
	ServerHandlerFn    func(context.Context, server.Request, interface{}, error) error
	ServerSubscriberFn func(context.Context, server.Message, error) error
}

func NewOptions added in v3.8.3

func NewOptions(opts ...Option) Options

Jump to

Keyboard shortcuts

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