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

Method For

mockresponses.go:526–536  ·  view source on GitHub ↗
(reqBody versionedDecoder)

Source from the content-addressed store, hash-verified

524}
525
526func (mr *MockOffsetCommitResponse) For(reqBody versionedDecoder) encoderWithHeader {
527 req := reqBody.(*OffsetCommitRequest)
528 group := req.ConsumerGroup
529 res := &OffsetCommitResponse{Version: req.version()}
530 for topic, partitions := range req.blocks {
531 for partition := range partitions {
532 res.AddError(topic, partition, mr.getError(group, topic, partition))
533 }
534 }
535 return res
536}
537
538func (mr *MockOffsetCommitResponse) getError(group, topic string, partition int32) KError {
539 topics := mr.errors[group]

Callers

nothing calls this directly

Calls 3

AddErrorMethod · 0.95
getErrorMethod · 0.95
versionMethod · 0.65

Tested by

no test coverage detected