git.zd.zone/hrpc/hrpc@v0.0.12/mq/kafka/message.go (about) 1 package kafka 2 3 import "time" 4 5 // Message represents the kafka message 6 type Message struct { 7 Topic string 8 Key []byte 9 Value []byte 10 Offset int64 11 Partition int32 12 Timestamp time.Time 13 } 14 15 func NewProduceMessage(value []byte) *Message { 16 return &Message{ 17 Value: value, 18 } 19 }