diff options
author | Alex <alex@adnab.me> | 2023-01-04 13:47:42 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-01-04 13:47:42 +0000 |
commit | 329c0e64f9044511f1a0d46b1b3ed99bdd890630 (patch) | |
tree | 222ec61f03c5abcca6678239111e94ad4dcfeb67 /src/garage/cli/structs.rs | |
parent | 4eb8ca3a528dae2848141f5cc3eb607eb7d40114 (diff) | |
parent | 29dbcb82780dcdb6f2a01a9da5122e70abaf93bf (diff) | |
download | garage-329c0e64f9044511f1a0d46b1b3ed99bdd890630.tar.gz garage-329c0e64f9044511f1a0d46b1b3ed99bdd890630.zip |
Merge pull request 'Improve `garage worker set` and add `garage worker get`' (#464) from worker-get into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/464
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index e2f632f3..661a71f0 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -517,11 +517,25 @@ pub enum WorkerOperation { /// Get detailed information about a worker #[structopt(name = "info", version = garage_version())] Info { tid: usize }, + /// Get worker parameter + #[structopt(name = "get", version = garage_version())] + Get { + /// Gather variable values from all nodes + #[structopt(short = "a", long = "all-nodes")] + all_nodes: bool, + /// Variable name to get, or none to get all variables + variable: Option<String>, + }, /// Set worker parameter #[structopt(name = "set", version = garage_version())] Set { - #[structopt(subcommand)] - opt: WorkerSetCmd, + /// Set variable values on all nodes + #[structopt(short = "a", long = "all-nodes")] + all_nodes: bool, + /// Variable node to set + variable: String, + /// Value to set the variable to + value: String, }, } @@ -536,19 +550,6 @@ pub struct WorkerListOpt { } #[derive(Serialize, Deserialize, StructOpt, Debug, Eq, PartialEq, Clone)] -pub enum WorkerSetCmd { - /// Set tranquility of scrub operations - #[structopt(name = "scrub-tranquility", version = garage_version())] - ScrubTranquility { tranquility: u32 }, - /// Set number of concurrent block resync workers - #[structopt(name = "resync-worker-count", version = garage_version())] - ResyncWorkerCount { worker_count: usize }, - /// Set tranquility of block resync operations - #[structopt(name = "resync-tranquility", version = garage_version())] - ResyncTranquility { tranquility: u32 }, -} - -#[derive(Serialize, Deserialize, StructOpt, Debug, Eq, PartialEq, Clone)] pub enum BlockOperation { /// List all blocks that currently have a resync error #[structopt(name = "list-errors", version = garage_version())] |