topic_partition.go 217 B

123456789101112
  1. package topic
  2. import "fmt"
  3. type TopicPartition struct {
  4. Topic
  5. Partition
  6. }
  7. func (tp *TopicPartition) String() string {
  8. return fmt.Sprintf("%v.%v-%04d-%04d", tp.Namespace, tp.Topic, tp.RangeStart, tp.RangeStop)
  9. }