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.