Add API `backoff:exp/1`/`backoff:exp/2`
Open
- Dominant language
- Erlang
- Stars
- 138
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
In my usage I count the number of retries R. I want to process an exponential backoff delay directly from this number R.
Why not offer an API such as:
```
1> backoff:increment(1).
2
2> backoff:increment(2).
4
3> backoff:increment(3).
8
```
This is the same as doing the recursive calls, but is more direct to use when working with a state tracking the number of retries.
The same with the jitter API: `backop:exp_rand/1` and `backop:exp_rand/2`.
I could do a PR if this makes sense.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.