pub struct UpstreamPool { /* private fields */ }Expand description
Manages the full set of upstream backends and their health states.
Implementations§
Source§impl UpstreamPool
impl UpstreamPool
Sourcepub fn from_validated(upstreams: &[ValidatedUpstream]) -> Self
pub fn from_validated(upstreams: &[ValidatedUpstream]) -> Self
Constructs a pool from validated upstream configurations, marking all backends as initially healthy.
Sourcepub fn all(&self) -> &[UpstreamState]
pub fn all(&self) -> &[UpstreamState]
Returns a slice of all backends (healthy and unhealthy).
Sourcepub fn healthy(&self) -> Vec<&UpstreamState>
pub fn healthy(&self) -> Vec<&UpstreamState>
Returns the backends that are currently marked healthy.
Trait Implementations§
Source§impl Clone for UpstreamPool
impl Clone for UpstreamPool
Source§fn clone(&self) -> UpstreamPool
fn clone(&self) -> UpstreamPool
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 UpstreamPool
impl RefUnwindSafe for UpstreamPool
impl Send for UpstreamPool
impl Sync for UpstreamPool
impl Unpin for UpstreamPool
impl UnwindSafe for UpstreamPool
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