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

Method Close

broker.go:374–380  ·  view source on GitHub ↗

Close closes the broker resources

()

Source from the content-addressed store, hash-verified

372
373// Close closes the broker resources
374func (b *Broker) Close() error {
375 b.lock.Lock()
376 defer b.lock.Unlock()
377
378 b.connErr = nil
379 return b.closeLocked()
380}
381
382// maybeCloseLocked closes on transport errors and reports whether a close was performed.
383// NOTE: caller must hold b.lock.

Callers 15

ExampleBrokerFunction · 0.95
TestBrokerFailedRequestFunction · 0.95
TestBrokerCloseFunction · 0.95
TestBrokerFetchFunction · 0.95
TestSASLOAuthBearerFunction · 0.95
TestSASLSCRAMSHAXXXFunction · 0.95
TestSASLPlainAuthFunction · 0.95
TestSASLReadTimeoutFunction · 0.95

Calls 1

closeLockedMethod · 0.95

Tested by 15

ExampleBrokerFunction · 0.76
TestBrokerFailedRequestFunction · 0.76
TestBrokerCloseFunction · 0.76
TestBrokerFetchFunction · 0.76
TestSASLOAuthBearerFunction · 0.76
TestSASLSCRAMSHAXXXFunction · 0.76
TestSASLPlainAuthFunction · 0.76
TestSASLReadTimeoutFunction · 0.76