(topic string, partition int32)
| 600 | } |
| 601 | |
| 602 | func (r *FetchResponse) getOrCreateBlock(topic string, partition int32) *FetchResponseBlock { |
| 603 | if r.Blocks == nil { |
| 604 | r.Blocks = make(map[string]map[int32]*FetchResponseBlock) |
| 605 | } |
| 606 | partitions, ok := r.Blocks[topic] |
| 607 | if !ok { |
| 608 | partitions = make(map[int32]*FetchResponseBlock) |
| 609 | r.Blocks[topic] = partitions |
| 610 | } |
| 611 | frb, ok := partitions[partition] |
| 612 | if !ok { |
| 613 | frb = new(FetchResponseBlock) |
| 614 | partitions[partition] = frb |
| 615 | } |
| 616 | |
| 617 | return frb |
| 618 | } |
| 619 | |
| 620 | func encodeKV(key, value Encoder) ([]byte, []byte) { |
| 621 | var kb []byte |
no outgoing calls