Compare commits
5 Commits
v4.1.26
...
77d1582543
| Author | SHA1 | Date | |
|---|---|---|---|
| 77d1582543 | |||
| 560afc5dd6 | |||
| 540bc415d5 | |||
| c32a17b69b | |||
| 9cb25acf63 |
@@ -43,7 +43,7 @@ type Options struct {
|
|||||||
// ContentType will be used if no content-type set when creating message
|
// ContentType will be used if no content-type set when creating message
|
||||||
ContentType string
|
ContentType string
|
||||||
// ErrorHandler specifies handler for all broker errors handling subscriber
|
// ErrorHandler specifies handler for all broker errors handling subscriber
|
||||||
ErrorHandler any
|
ErrorHandler func(Message) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOptions create new Options
|
// NewOptions create new Options
|
||||||
@@ -90,7 +90,7 @@ func ContentType(ct string) Option {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ErrorHandler handles errors in broker
|
// ErrorHandler handles errors in broker
|
||||||
func ErrorHandler(h any) Option {
|
func ErrorHandler(h func(Message) error) Option {
|
||||||
return func(o *Options) {
|
return func(o *Options) {
|
||||||
o.ErrorHandler = h
|
o.ErrorHandler = h
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user