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

Function shouldRetryfindingCoordinator

findcoordinator_test.go:77–86  ·  view source on GitHub ↗

Should retry looking for coordinator Returns true when the test Kafka broker is still setting up.

(resp *FindCoordinatorResponse, err error)

Source from the content-addressed store, hash-verified

75// Should retry looking for coordinator
76// Returns true when the test Kafka broker is still setting up.
77func shouldRetryfindingCoordinator(resp *FindCoordinatorResponse, err error) bool {
78 brokerSetupIncomplete := err != nil &&
79 strings.Contains(
80 strings.ToLower(err.Error()),
81 strings.ToLower("unexpected EOF"))
82 coordinatorNotFound := resp != nil &&
83 resp.Error != nil &&
84 errors.Is(resp.Error, GroupCoordinatorNotAvailable)
85 return brokerSetupIncomplete || coordinatorNotFound
86}

Callers 1

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…