pub struct LoadBalancer { /* private fields */ }Expand description
Load balancer
Implementations§
Source§impl LoadBalancer
impl LoadBalancer
pub fn new() -> Self
Sourcepub fn balancing_strategy(&self) -> &LoadBalancingStrategy
pub fn balancing_strategy(&self) -> &LoadBalancingStrategy
Return the current load-balancing strategy.
Sourcepub fn set_balancing_strategy(&mut self, strategy: LoadBalancingStrategy)
pub fn set_balancing_strategy(&mut self, strategy: LoadBalancingStrategy)
Set the load-balancing strategy.
Sourcepub fn record_backend_metrics(&mut self, metrics: BackendMetrics)
pub fn record_backend_metrics(&mut self, metrics: BackendMetrics)
Record or update metrics for a backend.
Sourcepub fn get_backend_metrics(&self, backend_id: &str) -> Option<&BackendMetrics>
pub fn get_backend_metrics(&self, backend_id: &str) -> Option<&BackendMetrics>
Get metrics for a specific backend.
Sourcepub fn list_backend_metrics(&self) -> Vec<String>
pub fn list_backend_metrics(&self) -> Vec<String>
List the ids of all backends with recorded metrics.
Sourcepub fn health_checker(&self) -> &HealthChecker
pub fn health_checker(&self) -> &HealthChecker
Return a reference to the health checker.
Sourcepub fn health_checker_mut(&mut self) -> &mut HealthChecker
pub fn health_checker_mut(&mut self) -> &mut HealthChecker
Return a mutable reference to the health checker.
Auto Trait Implementations§
impl Freeze for LoadBalancer
impl RefUnwindSafe for LoadBalancer
impl Send for LoadBalancer
impl Sync for LoadBalancer
impl Unpin for LoadBalancer
impl UnsafeUnpin for LoadBalancer
impl UnwindSafe for LoadBalancer
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more