Releases: Xuanwo/backon
Releases · Xuanwo/backon
v1.0.2
v1.0.1
v1.0.0
Upgrade
Since 1.0.0, backon Retry doesn't take a reference of builder anymore:
+ your_fn.retry(ExponentialBuilder::default()).await;
- your_fn.retry(&ExponentialBuilder::default()).await;Since version 0.5.0, backon no longer directly depends on tokio. Instead, users can now provide their own sleep implementation.
For example:
use anyhow::Result;
use backon::ExponentialBuilder;
use backon::Retryable;
use std::future::ready;
async fn main() -> Result<()> {
let content = fetch
.retry(&ExponentialBuilder::default())
.sleep(tokio::time::sleep)
.await?;
Ok(())
}To maintain the same behavior as before, please enable the tokio-sleep feature.
What's Changed
- fix: Expose struct out to generate API docs by @Xuanwo in #102
- refactor: Move all backoff in one mod by @Xuanwo in #103
- refactor: Take ownership of builder instead by @Xuanwo in #104
- docs: Re-position of backon by @Xuanwo in #106
- docs: Add a logo for backon by @Xuanwo in #107
- docs: Polish vision and docs by @Xuanwo in #108
- docs: Refactor examples by @Xuanwo in #109
- chore: Establish MSRV as 1.70 by @Xuanwo in #110
- Bump to version 1.0 by @Xuanwo in #111
Full Changelog: v0.5.0...v1.0.0
v0.5.0
Upgrade
Since version 0.5.0, backon no longer directly depends on tokio. Instead, users can now provide their own sleep implementation.
For example:
use anyhow::Result;
use backon::ExponentialBuilder;
use backon::Retryable;
use std::future::ready;
async fn main() -> Result<()> {
let content = fetch
.retry(&ExponentialBuilder::default())
.sleep(tokio::time::sleep)
.await?;
Ok(())
}To maintain the same behavior as before, please enable the tokio-sleep feature.
What's Changed
- Remove duplicate example, point to examples on docs index page by @matildasmeds in #84
- ci: Use macos-latest for test by @Xuanwo in #87
- feat: Remove dependences on pin_project and futures_core by @Xuanwo in #86
- docs: Add an example for sqlx by @Xuanwo in #91
- Use wasm-compatible sleep if compiled for wasm32 by @wackazong in #92
- feat: Allow user to provide sleeper by @Xuanwo in #93
- Bump to version 0.5.0 by @Xuanwo in #94
New Contributors
- @matildasmeds made their first contribution in #84
- @wackazong made their first contribution in #92
Full Changelog: v0.4.4...v0.5.0
v0.4.4
What's Changed
- docs: Update README by @Xuanwo in #76
- chore(deps): update reqwest requirement from 0.11 to 0.12 by @dependabot in #78
- feat: Add blocking retry with context support by @Xuanwo in #80
- Bump backon to 0.4.4 by @Xuanwo in #81
Full Changelog: v0.4.3...v0.4.4
v0.4.3
What's Changed
- fix: revise the logic of exponential strategy by @yangmeilly in #71
- feat: Add retry with context by @Xuanwo in #72
- docs: Add more examples by @Xuanwo in #73
- Bump to version 0.4.3 by @Xuanwo in #74
New Contributors
- @yangmeilly made their first contribution in #71
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's Changed
- fix: Make backon work in wasm by @Xuanwo in #60
- chore(deps): update fastrand requirement from 1.9.0 to 2.0.0 by @dependabot in #62
- chore(deps): bump actions/checkout from 3 to 4 by @dependabot in #64
- docs: Document
tokio::time::sleepusage by @vriesk in #66 - fix: fix
with_factorassert by @wcy-fdu in #68 - Bump to version 0.4.2 by @Xuanwo in #69
New Contributors
Full Changelog: v0.4.1...v0.4.2
v0.4.1
What's Changed
- docs: Fix typo in examples by @Xuanwo in #40
- docs: Fix typo in README by @wisarmy in #44
- Add examples by @balroggg in #45
- Add closure example by @balroggg in #46
- Add jitter to constant backoff by @balroggg in #47
- feat: impl fibonacci backoff by @maolonglong in #53
- feat: Allow
FnMut(..)onnotifyandwhenby @BlueGlassBlock in #54 - Bump to version 0.4.1 by @Xuanwo in #56
New Contributors
- @wisarmy made their first contribution in #44
- @balroggg made their first contribution in #45
- @maolonglong made their first contribution in #53
- @BlueGlassBlock made their first contribution in #54
Full Changelog: v0.4.0...v0.4.1