Compare commits

...

5 Commits
v4.1.26 ... v4

Author SHA1 Message Date
77d1582543 Merge branch 'v4' of https://github.com/unistack-org/micro into v4
All checks were successful
sync / sync (push) Successful in 10s
2025-12-16 09:17:32 +03:00
560afc5dd6 broker: fixup error handler func
Some checks failed
coverage / build (push) Failing after 1m54s
sync / sync (push) Failing after 16s
test / test (push) Failing after 18m21s
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-16 09:06:06 +03:00
540bc415d5 broker: fixup error handler func
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-16 09:01:36 +03:00
c32a17b69b broker: add ErrorHandler
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-16 08:25:59 +03:00
9cb25acf63 logger: conditional caller field
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2025-12-13 19:50:03 +03:00

View File

@@ -43,7 +43,7 @@ type Options struct {
// ContentType will be used if no content-type set when creating message
ContentType string
// ErrorHandler specifies handler for all broker errors handling subscriber
ErrorHandler any
ErrorHandler func(Message) error
}
// NewOptions create new Options
@@ -90,7 +90,7 @@ func ContentType(ct string) Option {
}
// ErrorHandler handles errors in broker
func ErrorHandler(h any) Option {
func ErrorHandler(h func(Message) error) Option {
return func(o *Options) {
o.ErrorHandler = h
}