Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changelog/1762990424.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
applies_to:
- client
authors:
- annahay
references: []
breaking: false
new_feature: true
bug_fix: false
---
Add support for static retry strategy
2 changes: 1 addition & 1 deletion rust-runtime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

mod never;
pub(crate) mod standard;
pub(crate) mod r#static;

pub use never::NeverRetryStrategy;
pub use standard::StandardRetryStrategy;
pub use r#static::StaticRetryStrategy;
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ fn check_rate_limiter_for_delay(
None
}

fn calculate_exponential_backoff(
pub(super) fn calculate_exponential_backoff(
base: f64,
initial_backoff: f64,
retry_attempts: u32,
Expand All @@ -338,7 +338,7 @@ fn calculate_exponential_backoff(
result.mul_f64(base)
}

fn get_seconds_since_unix_epoch(runtime_components: &RuntimeComponents) -> f64 {
pub(super) fn get_seconds_since_unix_epoch(runtime_components: &RuntimeComponents) -> f64 {
let request_time = runtime_components
.time_source()
.expect("time source required for retries");
Expand Down
Loading