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

Function NewMockFetchResponse

mockresponses.go:301–309  ·  mockresponses.go::NewMockFetchResponse
(t TestReporter, batchSize int)

Source from the content-addressed store, hash-verified

299}
300
301func NewMockFetchResponse(t TestReporter, batchSize int) *MockFetchResponse {
302 return &MockFetchResponse{
303 messages: make(map[string]map[int32]map[int64]*mockMessage),
304 messagesLock: &sync.RWMutex{},
305 highWaterMarks: make(map[string]map[int32]int64),
306 t: t,
307 batchSize: batchSize,
308 }
309}
310
311func (mfr *MockFetchResponse) SetMessage(topic string, partition int32, offset int64, msg Encoder) *MockFetchResponse {
312 return mfr.SetMessageWithKey(topic, partition, offset, nil, msg)

Calls

no outgoing calls