Skip to content

yevtyushkin/backoff-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔄 backoff-config ⚙️

codecov

This crate enables declarative configuration of backon retry crate strategies via environment variables or configuration files by:

  • Unifying the backoff strategies provided by the backon retry crate into a single enum (see BackoffConfig).

  • Implementing serde’s Deserialize to support loading strategies from various configuration sources. Duration values are deserialized using human-readable formats (e.g. 5s, 150 ms).

Examples

  • Loading from TOML and figment crate:
cargo run --example toml
  • Loading from env and figment crate:
cargo run --example env

Consider the following unit test specs for the detailed configuration formats:

About

Flexible Backoff Configuration In Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages