Crates.io | consistent-rs |
lib.rs | consistent-rs |
version | 0.1.1 |
source | src |
created_at | 2017-06-17 02:39:19.825258 |
updated_at | 2017-06-17 02:44:19.360152 |
description | Consistent hash package for Rust |
homepage | https://github.com/DavidCai1993/consistent |
repository | https://github.com/DavidCai1993/consistent |
max_upload_size | |
id | 19265 |
size | 11,108 |
Consistent hash package for Rust.
[dependencies]
consistent_rs = "0.1.1"
See: https://docs.rs/consistent-rs/0.1.1/consistent_rs/
let mut consistant = Consistant::default();
consistant.add("cacheA");
consistant.add("cacheB");
consistant.add("cacheC");
println!("david => {:?}", consistant.get("david"));
println!("james => {:?}", consistant.get("james"));
println!("kelly => {:?}", consistant.get("kelly"));