8000 GitHub - rust-playground/backoff-rs: Backoff provides the base components for implementing backoff and retry operations.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Backoff provides the base components for implementing backoff and retry operations.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rust-playground/backoff-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backoff   Build Status Latest Version

Backoff provides the base components for implementing backoff and retry operations.

Example

use backoff_rs::ExponentialBackoffBuilder;
use std::time::Duration;
fn main() {
    let bo = ExponentialBackoffBuilder::default()
        .factor(1.75)
        .interval(Duration::from_millis(500))
        .jitter(Duration::from_millis(150))
        .max(Duration::from_secs(5))
        .build();
    for attempt in 0..=5 {
        println!("{:?}", bo.duration(attempt));
    }
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Proteus by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Backoff provides the base components for implementing backoff and retry operations.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0