commit | 6b0e4ad0cd65431b217393bff47d1dff727b264b | [log] [tgz] |
---|---|---|
author | Nir Rozenbaum <nirro@il.ibm.com> | Thu Nov 11 16:41:09 2021 |
committer | GitHub <noreply@github.com> | Thu Nov 11 16:41:09 2021 |
tree | 6d0156cc9e2188a4b33d2ee06110a398bd685450 | |
parent | a78d3804c2c84f0a3178648138442c9b07665bda [diff] |
make sure no randomness is used when randomizationFactor is 0 (#118) in current implementation there is the following issue - it's not possible to disable randomization. I'd expect that if I set randomizationFactor to 0, no randomness will be done. I've updated the code accordingly to fix the issue.
This is a Go port of the exponential backoff algorithm from Google's HTTP Client Library for Java.
Exponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate. The retries exponentially increase and stop increasing when a certain threshold is met.
Import path is github.com/cenkalti/backoff/v4
. Please note the version part at the end.
Use https://pkg.go.dev/github.com/cenkalti/backoff/v4 to view the documentation.