(v time.Duration)
| 1485 | } |
| 1486 | |
| 1487 | func getJitter(v time.Duration) time.Duration { |
| 1488 | if v == infinity { |
| 1489 | return 0 |
| 1490 | } |
| 1491 | // Generate a jitter between +/- 10% of the value. |
| 1492 | r := int64(v / 10) |
| 1493 | j := rand.Int64N(2*r) - r |
| 1494 | return time.Duration(j) |
| 1495 | } |
| 1496 | |
| 1497 | type connectionKey struct{} |
| 1498 |
no outgoing calls
no test coverage detected