MCPcopy Create free account
hub / github.com/IBM/sarama / AddError

Method AddError

fetch_response.go:585–600  ·  view source on GitHub ↗
(topic string, partition int32, err KError)

Source from the content-addressed store, hash-verified

583}
584
585func (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
602func (r *FetchResponse) getOrCreateBlock(topic string, partition int32) *FetchResponseBlock {
603 if r.Blocks == nil {

Calls

no outgoing calls