diff options
author | Alex <alex@adnab.me> | 2022-11-04 15:51:16 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2022-11-04 15:51:16 +0000 |
commit | 0d279918b7681d9d71cde85c90d1da75026fd7bf (patch) | |
tree | b96e5830c8a40d25988e0e496a52eba4c71454c5 /src/garage/cli | |
parent | 043246c575d1ae85c7f375ef577b8fef6940a6d5 (diff) | |
parent | e03d9062f7f21dd0493dd82a7dcf82f2cd035943 (diff) | |
download | garage-0d279918b7681d9d71cde85c90d1da75026fd7bf.tar.gz garage-0d279918b7681d9d71cde85c90d1da75026fd7bf.zip |
Merge pull request 'Improvements to CLI' (#410) from cleanup-uploads-command into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/410
Diffstat (limited to 'src/garage/cli')
-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())] |