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

Method For

mockresponses.go:430–442  ·  view source on GitHub ↗
(reqBody versionedDecoder)

Source from the content-addressed store, hash-verified

428}
429
430func (mr *MockConsumerMetadataResponse) For(reqBody versionedDecoder) encoderWithHeader {
431 req := reqBody.(*ConsumerMetadataRequest)
432 group := req.ConsumerGroup
433 res := &ConsumerMetadataResponse{Version: req.version()}
434 v := mr.coordinators[group]
435 switch v := v.(type) {
436 case *MockBroker:
437 res.Coordinator = &Broker{id: v.BrokerID(), addr: v.Addr()}
438 case KError:
439 res.Err = v
440 }
441 return res
442}
443
444// MockFindCoordinatorResponse is a `FindCoordinatorResponse` builder.
445type MockFindCoordinatorResponse struct {

Callers

nothing calls this directly

Calls 3

BrokerIDMethod · 0.80
versionMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected