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

Method AddBlock

offset_fetch_response.go:68–78  ·  view source on GitHub ↗
(topic string, partition int32, block *OffsetFetchResponseBlock)

Source from the content-addressed store, hash-verified

66}
67
68func (g *OffsetFetchResponseGroup) AddBlock(topic string, partition int32, block *OffsetFetchResponseBlock) {
69 if g.Blocks == nil {
70 g.Blocks = make(map[string]map[int32]*OffsetFetchResponseBlock)
71 }
72 partitions := g.Blocks[topic]
73 if partitions == nil {
74 partitions = make(map[int32]*OffsetFetchResponseBlock)
75 g.Blocks[topic] = partitions
76 }
77 partitions[partition] = block
78}
79
80func (g *OffsetFetchResponseGroup) GetBlock(topic string, partition int32) *OffsetFetchResponseBlock {
81 return g.Blocks[topic][partition]

Callers 1

ForMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected