meta_srv::selector::weight_compute

Trait WeightCompute

Source
pub trait WeightCompute: Send + Sync {
    type Source;

    // Required method
    fn compute(&self, stat_kvs: &Self::Source) -> Vec<WeightedItem<Peer>>;
}
Expand description

The WeightCompute trait is used to compute the weight array by heartbeats.

Required Associated Types§

Required Methods§

Source

fn compute(&self, stat_kvs: &Self::Source) -> Vec<WeightedItem<Peer>>

Implementors§