broker: add Event Context() method

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-05-05 16:22:06 +03:00
parent 7c0a5f5e2a
commit 9c8fbb2202
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ type BatchHandler func(Events) error
// Event is given to a subscription handler for processing
type Event interface {
// Context return context.Context for event
Context() context.Context
// Topic returns event topic
Topic() string
// Message returns broker message