middleware

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns the middleware interceptor. Remember that the order of the interceptor is important. The first one is gonna be executed first.

func NewIgnoreErrors

func NewIgnoreErrors() message.HandlerMiddleware

NewIgnoreErrors creates a new IgnoreErrors middleware.

func NewMetadata

func NewMetadata(h message.HandlerFunc) message.HandlerFunc

NewMetadata add identifier information to message metadata.

func NewRecovery

func NewRecovery(h message.HandlerFunc) message.HandlerFunc

NewRecovery recovers from any panic in the handler and appends RecoveryPanicError with the stacktrace to any error returned from the handler.

Types

type IgnoreErrors

type IgnoreErrors struct {
	// contains filtered or unexported fields
}

IgnoreErrors provides a middleware that makes the handler ignore some explicitly whitelisted errors.

func (IgnoreErrors) Middleware

type RecoveryPanicError

type RecoveryPanicError struct {
	V          interface{}
	Stacktrace string
}

func (RecoveryPanicError) Error

func (p RecoveryPanicError) Error() string

Jump to

Keyboard shortcuts

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