MCPcopy
hub / github.com/segmentio/kafka-go / findGroupBalancer

Function findGroupBalancer

groupbalancer.go:332–339  ·  view source on GitHub ↗

findGroupBalancer returns the GroupBalancer with the specified protocolName from the slice provided.

(protocolName string, balancers []GroupBalancer)

Source from the content-addressed store, hash-verified

330// findGroupBalancer returns the GroupBalancer with the specified protocolName
331// from the slice provided.
332func findGroupBalancer(protocolName string, balancers []GroupBalancer) (GroupBalancer, bool) {
333 for _, balancer := range balancers {
334 if balancer.ProtocolName() == protocolName {
335 return balancer, true
336 }
337 }
338 return nil, false
339}

Callers 1

assignTopicPartitionsMethod · 0.85

Calls 1

ProtocolNameMethod · 0.65

Tested by

no test coverage detected