aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-08 15:50:56 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-08 15:50:56 +0200
commit7f54706b95beb033820924e77e18f21f241d223e (patch)
tree26fc26ebb80e15a1ca64edd03efc9fac758274d0 /src/api/s3
parent907054775dc71a10a92ab96112889db9113130ab (diff)
parentd9d199a6c9c0ae2a6ee2b04103c78ef1eb311956 (diff)
downloadgarage-7f54706b95beb033820924e77e18f21f241d223e.tar.gz
garage-7f54706b95beb033820924e77e18f21f241d223e.zip
Merge branch 'lx-perf-improvements' into netapp-stream-body
Diffstat (limited to 'src/api/s3')
-rw-r--r--src/api/s3/api_server.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs
index 78dfeeac..27837297 100644
--- a/src/api/s3/api_server.rs
+++ b/src/api/s3/api_server.rs
@@ -1,3 +1,4 @@
+use std::net::SocketAddr;
use std::sync::Arc;
use async_trait::async_trait;
@@ -43,16 +44,13 @@ pub(crate) struct S3ApiEndpoint {
impl S3ApiServer {
pub async fn run(
garage: Arc<Garage>,
+ addr: SocketAddr,
+ s3_region: String,
shutdown_signal: impl Future<Output = ()>,
) -> Result<(), GarageError> {
- let addr = garage.config.s3_api.api_bind_addr;
-
- ApiServer::new(
- garage.config.s3_api.s3_region.clone(),
- S3ApiServer { garage },
- )
- .run_server(addr, shutdown_signal)
- .await
+ ApiServer::new(s3_region, S3ApiServer { garage })
+ .run_server(addr, shutdown_signal)
+ .await
}
async fn handle_request_without_bucket(