Struct sozu_lib::backends::BackendList
source · pub struct BackendList {
pub backends: Vec<Rc<RefCell<Backend>>>,
pub next_id: u32,
pub load_balancing: Box<dyn LoadBalancingAlgorithm>,
}
Fields§
§backends: Vec<Rc<RefCell<Backend>>>
§next_id: u32
§load_balancing: Box<dyn LoadBalancingAlgorithm>
Implementations§
source§impl BackendList
impl BackendList
pub fn new() -> BackendList
pub fn import_configuration_state(backend_vec: &[Backend]) -> BackendList
pub fn add_backend(&mut self, backend: Backend)
pub fn remove_backend(&mut self, backend_address: &SocketAddr)
pub fn has_backend(&self, backend_address: &SocketAddr) -> bool
pub fn find_backend( &mut self, backend_address: &SocketAddr ) -> Option<&mut Rc<RefCell<Backend>>>
pub fn find_sticky( &mut self, sticky_session: &str ) -> Option<&mut Rc<RefCell<Backend>>>
pub fn available_backends(&mut self, backup: bool) -> Vec<Rc<RefCell<Backend>>>
pub fn next_available_backend(&mut self) -> Option<Rc<RefCell<Backend>>>
pub fn set_load_balancing_policy( &mut self, load_balancing_policy: LoadBalancingAlgorithms, metric: Option<LoadMetric> )
Trait Implementations§
source§impl Debug for BackendList
impl Debug for BackendList
Auto Trait Implementations§
impl Freeze for BackendList
impl !RefUnwindSafe for BackendList
impl !Send for BackendList
impl !Sync for BackendList
impl Unpin for BackendList
impl !UnwindSafe for BackendList
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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