backoff

Implementation of exponential backoff for nim.

Active Pure Nim score 81/100 · last commit 2026-11-08 · 9 stars · tests present · docs generated

Summary

Latest Version Unknown
License Apache-2.0
CI Status Failing
Stars 9
Forks 1
Open Issues 0
Last Commit 2026-11-08
Downloads 0
Last Indexed 2026-11-23 09:07

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

Build Status

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()