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

Method checkSeedBrokersHealth

client.go:687–698  ·  view source on GitHub ↗
(brokers []*Broker)

Source from the content-addressed store, hash-verified

685}
686
687func (client *client) checkSeedBrokersHealth(brokers []*Broker) {
688 if len(brokers) == 0 {
689 return
690 }
691
692 for _, broker := range brokers {
693 if err := broker.getSockError(); err != nil {
694 Logger.Printf("client/seedbrokers close seed broker #%d at %s due to socket error: %v", broker.ID(), broker.Addr(), err)
695 safeAsyncClose(broker)
696 }
697 }
698}
699
700func (client *client) checkBrokersHealth() {
701 for id, broker := range client.brokers {

Callers 1

checkBrokersHealthMethod · 0.95

Calls 5

safeAsyncCloseFunction · 0.85
getSockErrorMethod · 0.80
IDMethod · 0.80
PrintfMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected