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

Method AddBlock

offset_request.go:258–275  ·  view source on GitHub ↗
(topic string, partitionID int32, timestamp int64, maxOffsets int32)

Source from the content-addressed store, hash-verified

256}
257
258func (r *OffsetRequest) AddBlock(topic string, partitionID int32, timestamp int64, maxOffsets int32) {
259 if r.blocks == nil {
260 r.blocks = make(map[string]map[int32]*offsetRequestBlock)
261 }
262
263 if r.blocks[topic] == nil {
264 r.blocks[topic] = make(map[int32]*offsetRequestBlock)
265 }
266
267 tmp := new(offsetRequestBlock)
268 tmp.currentLeaderEpoch = -1
269 tmp.timestamp = timestamp
270 if r.Version == 0 {
271 tmp.maxNumOffsets = maxOffsets
272 }
273
274 r.blocks[topic][partitionID] = tmp
275}

Callers 1

getOffsetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected