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

Method defaultRequestHandler

mockbroker.go:365–379  ·  view source on GitHub ↗
(req *request)

Source from the content-addressed store, hash-verified

363}
364
365func (b *MockBroker) defaultRequestHandler(req *request) (res encoderWithHeader) {
366 select {
367 case res, ok := <-b.expectations:
368 if !ok {
369 return nil
370 }
371 // always match the response version to the request version
372 if pb, ok := res.(protocolBody); ok {
373 pb.setVersion(req.body.version())
374 }
375 return res
376 case <-time.After(expectationTimeout):
377 return nil
378 }
379}
380
381func isConnectionClosedError(err error) bool {
382 var result bool

Callers

nothing calls this directly

Calls 2

setVersionMethod · 0.65
versionMethod · 0.65

Tested by

no test coverage detected