Documentation ¶
Index ¶
- func New(logger watermill.LoggerAdapter) []message.HandlerMiddleware
- func NewIgnoreErrors() message.HandlerMiddleware
- func NewMetadata(h message.HandlerFunc) message.HandlerFunc
- func NewRecovery(h message.HandlerFunc) message.HandlerFunc
- func NewRetry(logger watermill.LoggerAdapter) message.HandlerMiddleware
- type IgnoreErrors
- type RecoveryPanicError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( logger watermill.LoggerAdapter, ) []message.HandlerMiddleware
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.
func NewRetry ¶
func NewRetry(logger watermill.LoggerAdapter) message.HandlerMiddleware
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 ¶
func (i IgnoreErrors) Middleware(h message.HandlerFunc) message.HandlerFunc
type RecoveryPanicError ¶
type RecoveryPanicError struct { V interface{} Stacktrace string }
func (RecoveryPanicError) Error ¶
func (p RecoveryPanicError) Error() string
Click to show internal directories.
Click to hide internal directories.