pub struct IPClientLoadBalancer { /* private fields */ }Expand description
Load balancer for reqwest::Client instances bound to specific IP addresses.
Uses interval-based allocation.
Implementations§
Source§impl IPClientLoadBalancer
impl IPClientLoadBalancer
Sourcepub fn new(entries: Vec<(Duration, Client)>) -> Self
pub fn new(entries: Vec<(Duration, Client)>) -> Self
Create a new interval-based load balancer with given clients.
Sourcepub fn with_ip(ip: Vec<IpAddr>, interval: Duration) -> Self
pub fn with_ip(ip: Vec<IpAddr>, interval: Duration) -> Self
Build a load balancer using all local IP addresses.
Trait Implementations§
Source§impl BoxLoadBalancer<Client> for IPClientLoadBalancer
impl BoxLoadBalancer<Client> for IPClientLoadBalancer
Source§impl Clone for IPClientLoadBalancer
impl Clone for IPClientLoadBalancer
Source§fn clone(&self) -> IPClientLoadBalancer
fn clone(&self) -> IPClientLoadBalancer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IPClientLoadBalancer
impl RefUnwindSafe for IPClientLoadBalancer
impl Send for IPClientLoadBalancer
impl Sync for IPClientLoadBalancer
impl Unpin for IPClientLoadBalancer
impl UnwindSafe for IPClientLoadBalancer
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