From 798b9ec6997cf763969f4c8706233f313590b685 Mon Sep 17 00:00:00 2001 From: Brent Gardner Date: Tue, 3 Dec 2024 10:10:59 -0700 Subject: [PATCH] start porting changes --- object_store/src/aws/client.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs index 47249685b7bb..c4261f875c33 100644 --- a/object_store/src/aws/client.rs +++ b/object_store/src/aws/client.rs @@ -186,7 +186,7 @@ impl From for Error { } } -#[derive(Debug)] +#[derive(Debug, Clone)] pub(crate) struct S3Config { pub region: String, pub endpoint: Option, @@ -462,6 +462,27 @@ impl S3Client { } } + #[allow(dead_code)] + pub(crate) fn request_with_config<'a>( + &'a self, + method: Method, + path: &'a Path, + config: &'a S3Config, + ) -> Request<'a> { + let url = self.config.path_url(path); + Request { + path, + builder: self.client.request(method, url), + payload: None, + payload_sha256: None, + config, + use_session_creds: true, + idempotent: false, + retry_on_conflict: false, + retry_error_body: false, + } + } + /// Make an S3 Delete Objects request /// /// Produces a vector of results, one for each path in the input vector. If