backoff
Implementation of exponential backoff for nim.
Summary
| Latest Version | Unknown |
|---|---|
| License | Apache-2.0 |
| CI Status | Passing |
| Stars | 8 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2022-02-06 |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install backoff
choosenim install backoff
git clone https://github.com/CORDEA/backoff
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| backoff | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/CORDEA/backoff |
|---|---|
| Homepage | https://github.com/CORDEA/backoff |
| Documentation | View Documentation |
| Registry Source | github |
README
backoff
Implementation of exponential backoff for nim.
Jitter
Support three jitter algorithms.
- Full Jitter
- Equal Jitter
- Decorrlated Jitter
And of course, without Jitter. I referred to Exponential Backoff And Jitter - AWS Architecture Blog.
Usage
let
client = ApiClient()
# Full Jitter
waiter = newBackoff(TypeFull, 10, 16000)
while true:
let response = client.request()
if response.code.is2xx:
break
waiter.wait() # or await waiter.waitAsync()