pub struct DynamicRouteProvider { /* private fields */ }Expand description
A RouteProvider that will attempt to discover new boundary nodes and cycle through them, optionally prioritizing those with low latency.
Implementations§
Source§impl DynamicRouteProvider
impl DynamicRouteProvider
Sourcepub async fn run_in_background(
seed_domains: Vec<String>,
client: Arc<dyn HttpService>,
strategy: DynamicRoutingStrategy,
) -> Result<Self, AgentError>
pub async fn run_in_background( seed_domains: Vec<String>, client: Arc<dyn HttpService>, strategy: DynamicRoutingStrategy, ) -> Result<Self, AgentError>
Create a new DynamicRouter from a list of seed domains and a routing strategy.
Sourcepub async fn run_in_background_with_intervals(
seed_domains: Vec<String>,
client: Arc<dyn HttpService>,
strategy: DynamicRoutingStrategy,
list_update_interval: Duration,
health_check_interval: Duration,
) -> Result<Self, AgentError>
pub async fn run_in_background_with_intervals( seed_domains: Vec<String>, client: Arc<dyn HttpService>, strategy: DynamicRoutingStrategy, list_update_interval: Duration, health_check_interval: Duration, ) -> Result<Self, AgentError>
Same as run_in_background, but with custom intervals for refreshing the routing list and health-checking nodes.
Trait Implementations§
Source§impl Debug for DynamicRouteProvider
impl Debug for DynamicRouteProvider
Source§impl RouteProvider for DynamicRouteProvider
impl RouteProvider for DynamicRouteProvider
Auto Trait Implementations§
impl Freeze for DynamicRouteProvider
impl !RefUnwindSafe for DynamicRouteProvider
impl Send for DynamicRouteProvider
impl Sync for DynamicRouteProvider
impl Unpin for DynamicRouteProvider
impl !UnwindSafe for DynamicRouteProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more