diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-08 15:50:56 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-08 15:50:56 +0200 |
commit | 7f54706b95beb033820924e77e18f21f241d223e (patch) | |
tree | 26fc26ebb80e15a1ca64edd03efc9fac758274d0 /src/api/k2v | |
parent | 907054775dc71a10a92ab96112889db9113130ab (diff) | |
parent | d9d199a6c9c0ae2a6ee2b04103c78ef1eb311956 (diff) | |
download | garage-7f54706b95beb033820924e77e18f21f241d223e.tar.gz garage-7f54706b95beb033820924e77e18f21f241d223e.zip |
Merge branch 'lx-perf-improvements' into netapp-stream-body
Diffstat (limited to 'src/api/k2v')
-rw-r--r-- | src/api/k2v/api_server.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs index eb0fbdd7..084867b5 100644 --- a/src/api/k2v/api_server.rs +++ b/src/api/k2v/api_server.rs @@ -1,3 +1,4 @@ +use std::net::SocketAddr; use std::sync::Arc; use async_trait::async_trait; @@ -36,20 +37,13 @@ pub(crate) struct K2VApiEndpoint { impl K2VApiServer { pub async fn run( garage: Arc<Garage>, + bind_addr: SocketAddr, + s3_region: String, shutdown_signal: impl Future<Output = ()>, ) -> Result<(), GarageError> { - if let Some(cfg) = &garage.config.k2v_api { - let bind_addr = cfg.api_bind_addr; - - ApiServer::new( - garage.config.s3_api.s3_region.clone(), - K2VApiServer { garage }, - ) + ApiServer::new(s3_region, K2VApiServer { garage }) .run_server(bind_addr, shutdown_signal) .await - } else { - Ok(()) - } } } |