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

Function backoff

dialer.go:437–443  ·  view source on GitHub ↗
(attempt int, min time.Duration, max time.Duration)

Source from the content-addressed store, hash-verified

435}
436
437func backoff(attempt int, min time.Duration, max time.Duration) time.Duration {
438 d := time.Duration(attempt*attempt) * min
439 if d > max {
440 d = max
441 }
442 return d
443}
444
445func canonicalAddress(s string) string {
446 return net.JoinHostPort(splitHostPort(s))

Callers 4

LookupPartitionMethod · 0.85
runMethod · 0.85
writeBatchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected