pub fn dispatch(continuums: &[Continuum], token: &DynToken) -> Option<u32>Expand description
Find the peer that owns token on the continuum.
Returns the peer index for the continuum point that owns
token, or None when the slice is empty.
ยงExamples
use dynomite::cluster::vnode::dispatch;
use dynomite::cluster::datacenter::Continuum;
use dynomite::hashkit::DynToken;
let cs: [Continuum; 0] = [];
assert_eq!(dispatch(&cs, &DynToken::from_u32(0)), None);