feat: add events contract

This commit is contained in:
Rogee
2024-12-31 15:38:20 +08:00
parent 6763f26996
commit 95510b8eac
3 changed files with 26 additions and 6 deletions

9
contracts/events.go Normal file
View File

@@ -0,0 +1,9 @@
package contracts
import "github.com/ThreeDotsLabs/watermill/message"
type EventHandler interface {
Topic() string
PublishToTopic() string
Handler(msg *message.Message) ([]*message.Message, error)
}