aboutsummaryrefslogtreecommitdiff
path: root/src/k2v-client/bin
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-05-22 09:03:08 +0000
committerAlex <alex@adnab.me>2023-05-22 09:03:08 +0000
commit9d833bb7efc2c166036db38da89b0b5ac8f466fe (patch)
tree827c751387fcd4424c4e9af467b23cf5514619e7 /src/k2v-client/bin
parent03efc191c1697140d24c431e88bd4964c77823e5 (diff)
parentc3d3b837ebeb98e8639659183ae801b3a280de99 (diff)
downloadgarage-9d833bb7efc2c166036db38da89b0b5ac8f466fe.tar.gz
garage-9d833bb7efc2c166036db38da89b0b5ac8f466fe.zip
Merge pull request 'K2V-client improvements' (#577) from k2v-client-aws-sigv4 into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/577
Diffstat (limited to 'src/k2v-client/bin')
-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 {