Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultClientErrorFunc = func(req client.Request, rsp interface{}, err error) error { if rsp != nil { return errors.BadGateway(req.Service(), "%v", err) } return errors.BadRequest(req.Service(), "%v", err) } DefaultServerErrorFunc = func(req server.Request, rsp interface{}, err error) error { if rsp != nil { return errors.BadGateway(req.Service(), "%v", err) } return errors.BadRequest(req.Service(), "%v", err) } DefaultPublishErrorFunc = func(msg client.Message, err error) error { return errors.BadRequest(msg.Topic(), "%v", err) } DefaultSubscribeErrorFunc = func(msg server.Message, err error) error { return errors.BadRequest(msg.Topic(), "%v", err) } )
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
Option func signature
func ClientReqErrorFn ¶ added in v3.1.3
func ClientReqErrorFn(fn ClientErrorFunc) Option
func ClientValidateResponse ¶ added in v3.2.0
func PublishErrorFn ¶
func PublishErrorFn(fn PublishErrorFunc) Option
func ServerErrorFn ¶
func ServerErrorFn(fn ServerErrorFunc) Option
func ServerValidateResponse ¶ added in v3.2.0
func SubscribeErrorFn ¶
func SubscribeErrorFn(fn SubscribeErrorFunc) Option
type Options ¶
type Options struct { ClientErrorFn ClientErrorFunc ServerErrorFn ServerErrorFunc PublishErrorFn PublishErrorFunc SubscribeErrorFn SubscribeErrorFunc ClientValidateResponse bool ServerValidateResponse bool }
Options struct holds wrapper options
func NewOptions ¶
Click to show internal directories.
Click to hide internal directories.