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

Method AddBlockWithLeaderEpoch

offset_commit_request.go:311–321  ·  view source on GitHub ↗
(topic string, partitionID int32, offset int64, leaderEpoch int32, timestamp int64, metadata string)

Source from the content-addressed store, hash-verified

309}
310
311func (r *OffsetCommitRequest) AddBlockWithLeaderEpoch(topic string, partitionID int32, offset int64, leaderEpoch int32, timestamp int64, metadata string) {
312 if r.blocks == nil {
313 r.blocks = make(map[string]map[int32]*offsetCommitRequestBlock)
314 }
315
316 if r.blocks[topic] == nil {
317 r.blocks[topic] = make(map[int32]*offsetCommitRequestBlock)
318 }
319
320 r.blocks[topic][partitionID] = &offsetCommitRequestBlock{offset, timestamp, leaderEpoch, metadata}
321}
322
323func (r *OffsetCommitRequest) Offset(topic string, partitionID int32) (int64, string, error) {
324 partitions := r.blocks[topic]

Callers 3

AddBlockMethod · 0.95
constructRequestForMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected