feat: update EventHandler and EventPublisher interfaces to include Channel and PublishTo methods
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user