ExponentialBackoff implements retry logic with backoff
| 161 | |
| 162 | // ExponentialBackoff implements retry logic with backoff |
| 163 | type ExponentialBackoff struct { |
| 164 | InitialInterval time.Duration |
| 165 | MaxInterval time.Duration |
| 166 | Multiplier float64 |
| 167 | currentInterval time.Duration |
| 168 | attempt int |
| 169 | protocol *ProtocolClient // For logging |
| 170 | } |
| 171 | |
| 172 | // NewExponentialBackoff creates a new backoff handler |
| 173 | func NewExponentialBackoff() *ExponentialBackoff { |
nothing calls this directly
no outgoing calls
no test coverage detected