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

Method AddBlockWithLeaderEpoch

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

Source from the content-addressed store, hash-verified

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

Callers 3

AddBlockMethod · 0.95
constructRequestForMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected