diff options
author | Alex Auvolat <alex@adnab.me> | 2023-11-27 16:17:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-11-27 16:22:25 +0100 |
commit | 11e6fef93ce3ca56584fc99223b71da77d320dd7 (patch) | |
tree | 247fbb731db2e3ba76c83c57bec594d7861900a0 /src/garage/cli/structs.rs | |
parent | 539a920313fff010b8a4291aeef58ec9a14ee635 (diff) | |
download | garage-11e6fef93ce3ca56584fc99223b71da77d320dd7.tar.gz garage-11e6fef93ce3ca56584fc99223b71da77d320dd7.zip |
cli: add layout history and layout assume-sync commands
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 3badc447..c4b400f4 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -112,6 +112,14 @@ pub enum LayoutOperation { /// Revert staged changes to cluster layout #[structopt(name = "revert", version = garage_version())] Revert(RevertLayoutOpt), + + /// View the history of layouts in the cluster + #[structopt(name = "history", version = garage_version())] + History, + + /// Assume all nodes are synchronized up to a certain layout version + #[structopt(name = "assume-sync", version = garage_version())] + AssumeSync(AssumeSyncOpt), } #[derive(StructOpt, Debug)] @@ -169,6 +177,14 @@ pub struct RevertLayoutOpt { pub(crate) yes: bool, } +#[derive(StructOpt, Debug)] +pub struct AssumeSyncOpt { + /// Version number of the layout to assume is currently up-to-date. + /// This will generally be the current layout version. + #[structopt(long = "version")] + pub(crate) version: u64, +} + #[derive(Serialize, Deserialize, StructOpt, Debug)] pub enum BucketOperation { /// List buckets |