(attempt int, min time.Duration, max time.Duration)
| 435 | } |
| 436 | |
| 437 | func 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 | |
| 445 | func canonicalAddress(s string) string { |
| 446 | return net.JoinHostPort(splitHostPort(s)) |
no outgoing calls
no test coverage detected