Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
FailoverConfig
Defined in the failover module.
Rust AI Agent SDK
Configuration for failover behavior.
Fields
| Name | Type | Description |
|---|
max_retries | u32 | Maximum retry attempts per request |
retry_delay | f64 | Base delay between retries (seconds) |
exponential_backoff | bool | Whether to use exponential backoff |
max_retry_delay | f64 | Maximum retry delay (seconds) |
cooldown_on_rate_limit | f64 | Cooldown duration for rate limits (seconds) |
cooldown_on_error | f64 | Cooldown duration for errors (seconds) |
rotate_on_success | bool | Whether to rotate profiles on success |
Methods
new
Create a new config with defaults
max_retries
fn max_retries(mut self, retries: u32) -> Self
Set max retries
Parameters:
retry_delay
fn retry_delay(mut self, delay: f64) -> Self
Set retry delay
Parameters:
exponential_backoff
fn exponential_backoff(mut self, enabled: bool) -> Self
Set exponential backoff
Parameters:
max_retry_delay
fn max_retry_delay(mut self, delay: f64) -> Self
Set max retry delay
Parameters:
cooldown_on_rate_limit
fn cooldown_on_rate_limit(mut self, seconds: f64) -> Self
Set cooldown on rate limit
Parameters:
cooldown_on_error
fn cooldown_on_error(mut self, seconds: f64) -> Self
Set cooldown on error
Parameters:
Source
View on GitHub
praisonai/src/failover/mod.rs at line 211