1 package model 2 3 import ( 4 "fmt" 5 ) 6 7 type SourceID struct { 8 Topic string 9 Partition int32 10 Offset int64 11 } 12 13 type Message struct { 14 ID SourceID 15 Headers map[string]string 16 Payload []byte 17 } 18 19 func (id *SourceID) String() string { 20 return fmt.Sprintf("%v[%d]@%v", id.Topic, id.Partition, id.Offset) 21 } 22