Skip to content

Commit

Permalink
[Event] Add GetTopic method to Event interface (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
rokatyy authored Jan 16, 2024
1 parent df3cbdf commit 5c18012
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ type Event interface {

// GetOffset returns the offset of the event
GetOffset() int

// GetTopic returns the topic of the event
GetTopic() string
}

// AbstractEvent provides a base implementation of an event
Expand Down Expand Up @@ -291,3 +294,8 @@ func (ae *AbstractEvent) GetLastInBatch() bool {
func (ae *AbstractEvent) GetOffset() int {
return 0
}

// GetTopic returns the topic of the event
func (ae *AbstractEvent) GetTopic() string {
return ""
}

0 comments on commit 5c18012

Please sign in to comment.