MCPcopy
hub / github.com/IBM/sarama / SetHighWaterMark

Method SetHighWaterMark

mockresponses.go:332–340  ·  mockresponses.go::MockFetchResponse.SetHighWaterMark
(topic string, partition int32, offset int64)

Source from the content-addressed store, hash-verified

330}
331
332func (mfr *MockFetchResponse) SetHighWaterMark(topic string, partition int32, offset int64) *MockFetchResponse {
333 partitions := mfr.highWaterMarks[topic]
334 if partitions == nil {
335 partitions = make(map[int32]int64)
336 mfr.highWaterMarks[topic] = partitions
337 }
338 partitions[partition] = offset
339 return mfr
340}
341
342func (mfr *MockFetchResponse) For(reqBody versionedDecoder) encoderWithHeader {
343 fetchRequest := reqBody.(*FetchRequest)

Callers 4

TestConsumerOffsetManualFunction · 0.95
TestConsumerOffsetNewestFunction · 0.80
TestConsumerOffsetOldestFunction · 0.80

Calls

no outgoing calls

Tested by 4

TestConsumerOffsetManualFunction · 0.76
TestConsumerOffsetNewestFunction · 0.64
TestConsumerOffsetOldestFunction · 0.64