feat: update EventHandler and EventPublisher interfaces to include Channel and PublishTo methods

This commit is contained in:
Rogee
2025-09-11 14:10:38 +08:00
parent f9e82eba02
commit dad2a26611

View File

@@ -4,11 +4,15 @@ import "github.com/ThreeDotsLabs/watermill/message"
type EventHandler interface {
Topic() string
PublishToTopic() string
Channel() Channel
PublishTo() (Channel, string)
Handler(msg *message.Message) ([]*message.Message, error)
}
type Channel string
type EventPublisher interface {
Topic() string
Channel() Channel
Marshal() ([]byte, error)
}