diff options
author | Alex Auvolat <lx@deuxfleurs.fr> | 2025-01-30 12:19:23 +0100 |
---|---|---|
committer | Alex Auvolat <lx@deuxfleurs.fr> | 2025-01-30 12:19:23 +0100 |
commit | 819f4f00509a57097d0ee8291e1556829e982e14 (patch) | |
tree | 093bea802946c81abd2845c046bad0d25d392624 /src/garage/cli/util.rs | |
parent | 69ddaafc6061d06d277fe772dfaa7fe64ecafcc1 (diff) | |
download | garage-819f4f00509a57097d0ee8291e1556829e982e14.tar.gz garage-819f4f00509a57097d0ee8291e1556829e982e14.zip |
cli: migrate layout remove, apply, revert
Diffstat (limited to 'src/garage/cli/util.rs')
-rw-r--r-- | src/garage/cli/util.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs index 21c14f42..c591cadd 100644 --- a/src/garage/cli/util.rs +++ b/src/garage/cli/util.rs @@ -233,27 +233,6 @@ pub fn print_bucket_info( }; } -pub fn find_matching_node( - cand: impl std::iter::Iterator<Item = Uuid>, - pattern: &str, -) -> Result<Uuid, Error> { - let mut candidates = vec![]; - for c in cand { - if hex::encode(c).starts_with(pattern) && !candidates.contains(&c) { - candidates.push(c); - } - } - if candidates.len() != 1 { - Err(Error::Message(format!( - "{} nodes match '{}'", - candidates.len(), - pattern, - ))) - } else { - Ok(candidates[0]) - } -} - pub fn print_worker_list(wi: HashMap<usize, WorkerInfo>, wlo: WorkerListOpt) { let mut wi = wi.into_iter().collect::<Vec<_>>(); wi.sort_by_key(|(tid, info)| { |