From 085755eebc75454fcc2ec92b49a5c884008c2e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C3=ABl=20Gu=C3=A9neau?= Date: Wed, 10 Apr 2024 18:46:49 +0200 Subject: [PATCH] stop hardcoding the s3 region and endpoint url --- src/main.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3ba0414..324f500 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -use aws_config::Region; use aws_sdk_s3 as s3; use eyre::{OptionExt, WrapErr}; use serde::{Deserialize, Serialize}; @@ -11,9 +10,6 @@ const RESTIC_ALARM_BUCKET: &str = "restic-alarm-state"; const RESTIC_ALARM_STATE_FILE: &str = "state.toml"; const RESTIC_ALARM_WATCH_DIR: &str = "watch/"; -const S3_REGION: &str = "infracoll"; -const S3_ENDPOINT: &str = "http://garage.isomorphis.me:3900"; - #[derive(Serialize, Deserialize, Clone, Debug)] struct State { last_alert: HashMap, @@ -246,8 +242,6 @@ async fn check_repo(client: &s3::Client, state: &mut State, repo: &str) -> eyre: async fn main() -> eyre::Result<()> { let sdk_config = aws_config::load_from_env().await; let config = aws_sdk_s3::config::Builder::from(&sdk_config) - .region(Region::new(S3_REGION)) - .endpoint_url(S3_ENDPOINT) .force_path_style(true) .build(); let client = aws_sdk_s3::Client::from_conf(config);