diff options
author | Alex Auvolat <alex@adnab.me> | 2022-11-04 11:55:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-11-04 11:55:59 +0100 |
commit | 5b18fd8201af98798f0a47a95dfec2f3ab9777f8 (patch) | |
tree | 35693b8d63103e23673dccd91100d8fb6963c6b9 /src/garage/cli/structs.rs | |
parent | 043246c575d1ae85c7f375ef577b8fef6940a6d5 (diff) | |
download | garage-5b18fd8201af98798f0a47a95dfec2f3ab9777f8.tar.gz garage-5b18fd8201af98798f0a47a95dfec2f3ab9777f8.zip |
Add garage bucket cleanup-incomplete-uploads commandcleanup-uploads-command
Diffstat (limited to 'src/garage/cli/structs.rs')
-rw-r--r-- | src/garage/cli/structs.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs index 06548e89..cb085813 100644 --- a/src/garage/cli/structs.rs +++ b/src/garage/cli/structs.rs @@ -189,6 +189,10 @@ pub enum BucketOperation { /// Set the quotas for this bucket #[structopt(name = "set-quotas", version = garage_version())] SetQuotas(SetQuotasOpt), + + /// Clean up (abort) old incomplete multipart uploads + #[structopt(name = "cleanup-incomplete-uploads", version = garage_version())] + CleanupIncompleteUploads(CleanupIncompleteUploadsOpt), } #[derive(Serialize, Deserialize, StructOpt, Debug)] @@ -291,6 +295,17 @@ pub struct SetQuotasOpt { } #[derive(Serialize, Deserialize, StructOpt, Debug)] +pub struct CleanupIncompleteUploadsOpt { + /// Abort multipart uploads older than this value + #[structopt(long = "older-than", default_value = "1d")] + pub older_than: String, + + /// Name of bucket(s) to clean up + #[structopt(required = true)] + pub buckets: Vec<String>, +} + +#[derive(Serialize, Deserialize, StructOpt, Debug)] pub enum KeyOperation { /// List keys #[structopt(name = "list", version = garage_version())] |