testing API
(topic string, partition int32, offset int64)
| 255 | // testing API |
| 256 | |
| 257 | func (r *OffsetResponse) AddTopicPartition(topic string, partition int32, offset int64) { |
| 258 | if r.Blocks == nil { |
| 259 | r.Blocks = make(map[string]map[int32]*OffsetResponseBlock) |
| 260 | } |
| 261 | byTopic, ok := r.Blocks[topic] |
| 262 | if !ok { |
| 263 | byTopic = make(map[int32]*OffsetResponseBlock) |
| 264 | r.Blocks[topic] = byTopic |
| 265 | } |
| 266 | byTopic[partition] = &OffsetResponseBlock{Offsets: []int64{offset}, Offset: offset} |
| 267 | } |
no outgoing calls