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

Function computeMetadataBackoff

client.go:1187–1194  ·  view source on GitHub ↗
(conf *Config, attemptsRemaining int)

Source from the content-addressed store, hash-verified

1185}
1186
1187func computeMetadataBackoff(conf *Config, attemptsRemaining int) time.Duration {
1188 if conf.Metadata.Retry.BackoffFunc != nil {
1189 maxRetries := conf.Metadata.Retry.Max
1190 retries := maxRetries - attemptsRemaining
1191 return conf.Metadata.Retry.BackoffFunc(retries, maxRetries)
1192 }
1193 return conf.Metadata.Retry.Backoff
1194}
1195
1196func (client *client) findCoordinator(coordinatorKey string, coordinatorType CoordinatorType, attemptsRemaining int) (*FindCoordinatorResponse, error) {
1197 retry := func(err error) (*FindCoordinatorResponse, error) {

Callers 3

newClaimWithRetryMethod · 0.85
tryRefreshMetadataMethod · 0.85
findCoordinatorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected