aboutsummaryrefslogtreecommitdiff
path: root/src/k2v-client/bin/k2v-cli.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-18 13:04:17 +0200
committerAlex Auvolat <alex@adnab.me>2023-05-19 12:08:29 +0200
commit644e8722641c826603f7ee3c2c7b58f31ab88c23 (patch)
treef70c6515c3dc937d149f20528fddb74684727a68 /src/k2v-client/bin/k2v-cli.rs
parent03efc191c1697140d24c431e88bd4964c77823e5 (diff)
downloadgarage-644e8722641c826603f7ee3c2c7b58f31ab88c23.tar.gz
garage-644e8722641c826603f7ee3c2c7b58f31ab88c23.zip
Port k2v-client to aws-sigv4 since rusoto_signature is deprecated
Diffstat (limited to 'src/k2v-client/bin/k2v-cli.rs')
-rw-r--r--src/k2v-client/bin/k2v-cli.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/k2v-client/bin/k2v-cli.rs b/src/k2v-client/bin/k2v-cli.rs
index 984b4192..5a2422ab 100644
--- a/src/k2v-client/bin/k2v-cli.rs
+++ b/src/k2v-client/bin/k2v-cli.rs
@@ -8,9 +8,6 @@ use k2v_client::*;
use format_table::format_table;
-use rusoto_core::credential::AwsCredentials;
-use rusoto_core::Region;
-
use clap::{Parser, Subcommand};
/// K2V command line interface
@@ -408,14 +405,16 @@ async fn main() -> Result<(), Error> {
let args = Args::parse();
- let region = Region::Custom {
- name: args.region,
+ let config = K2vClientConfig {
endpoint: args.endpoint,
+ region: args.region,
+ aws_access_key_id: args.key_id,
+ aws_secret_access_key: args.secret,
+ bucket: args.bucket,
+ user_agent: None,
};
- let creds = AwsCredentials::new(args.key_id, args.secret, None, None);
-
- let client = K2vClient::new(region, args.bucket, creds, None)?;
+ let client = K2vClient::new(config)?;
match args.command {
Command::Insert {