(topic string, partition int32, err KError)
| 583 | } |
| 584 | |
| 585 | func (r *FetchResponse) AddError(topic string, partition int32, err KError) { |
| 586 | if r.Blocks == nil { |
| 587 | r.Blocks = make(map[string]map[int32]*FetchResponseBlock) |
| 588 | } |
| 589 | partitions, ok := r.Blocks[topic] |
| 590 | if !ok { |
| 591 | partitions = make(map[int32]*FetchResponseBlock) |
| 592 | r.Blocks[topic] = partitions |
| 593 | } |
| 594 | frb, ok := partitions[partition] |
| 595 | if !ok { |
| 596 | frb = new(FetchResponseBlock) |
| 597 | partitions[partition] = frb |
| 598 | } |
| 599 | frb.Err = err |
| 600 | } |
| 601 | |
| 602 | func (r *FetchResponse) getOrCreateBlock(topic string, partition int32) *FetchResponseBlock { |
| 603 | if r.Blocks == nil { |
no outgoing calls