[][src]Trait cdrs_temp::load_balancing::LoadBalancingStrategy

pub trait LoadBalancingStrategy<N>: Sized {
    fn init(&mut self, cluster: Vec<N>);
fn next(&self) -> Option<&N>; fn remove_node<F>(&mut self, _filter: F)
    where
        F: FnMut(&N) -> bool
, { ... } }

Required methods

fn init(&mut self, cluster: Vec<N>)

fn next(&self) -> Option<&N>

Loading content...

Provided methods

fn remove_node<F>(&mut self, _filter: F) where
    F: FnMut(&N) -> bool

Loading content...

Implementors

impl<N> LoadBalancingStrategy<N> for Random<N>[src]

fn next(&self) -> Option<&N>[src]

Returns next random node from a cluster

impl<N> LoadBalancingStrategy<N> for RoundRobin<N>[src]

fn next(&self) -> Option<&N>[src]

Returns next node from a cluster

impl<N> LoadBalancingStrategy<N> for RoundRobinSync<N>[src]

fn next(&self) -> Option<&N>[src]

Returns next node from a cluster

impl<N> LoadBalancingStrategy<N> for SingleNode<N>[src]

fn next(&self) -> Option<&N>[src]

Returns first node from a cluster

Loading content...