🔄 backoff-config ⚙️
backoff-config makes configuring backoff more flexible by providing a unified Backoff strategy enum and a
BackoffConfig that supports deserialization.
The actual backoff logic is powered by the awesome backon crate. Make sure to check out backon to explore its amazing features and ergonomics!
backoff-config integrates with backon by implementing:
Usage
- Add
backoff-configto your dependencies:
- Load
BackoffConfigand use it straight away in retries. Example with figment:
use Deserialize;
use Retryable;
async
// Function that may fail
async
Examples
- TOML + figment:
And some examples on data formats: