Builds a random router whose targets all share an echo client.
(names: &[&str], weights: Option<Vec<f64>>, seed: Option<u64>)
| 233 | |
| 234 | /// Builds a random router whose targets all share an echo client. |
| 235 | fn algorithm(names: &[&str], weights: Option<Vec<f64>>, seed: Option<u64>) -> Result<Random> { |
| 236 | Random::new(target_set(names), weights, seed) |
| 237 | } |
| 238 | |
| 239 | fn shared_algorithm(names: &[&str]) -> Result<Arc<dyn Algorithm>> { |
| 240 | Ok(Arc::new(algorithm(names, None, None)?)) |