diff options
author | networkException <git@nwex.de> | 2023-09-29 18:41:00 +0200 |
---|---|---|
committer | networkException <git@nwex.de> | 2023-09-29 18:57:44 +0200 |
commit | 8ec6a53b35e5bb742640a77ff282f2474c63af54 (patch) | |
tree | 4b6a82342cd9ce665d933dc243be7e34ad608f32 /src/api/k2v/api_server.rs | |
parent | 7353038a64cc53cc01c4ec7f21671d3443177707 (diff) | |
download | garage-8ec6a53b35e5bb742640a77ff282f2474c63af54.tar.gz garage-8ec6a53b35e5bb742640a77ff282f2474c63af54.zip |
everywhere: support unix sockets when binding in various places
this patch implements binding to paths as a unix socket for generic
server and web server.
Diffstat (limited to 'src/api/k2v/api_server.rs')
-rw-r--r-- | src/api/k2v/api_server.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs index bb85b2e7..413fd61c 100644 --- a/src/api/k2v/api_server.rs +++ b/src/api/k2v/api_server.rs @@ -1,4 +1,3 @@ -use std::net::SocketAddr; use std::sync::Arc; use async_trait::async_trait; @@ -9,6 +8,7 @@ use hyper::{Body, Method, Request, Response}; use opentelemetry::{trace::SpanRef, KeyValue}; use garage_util::error::Error as GarageError; +use garage_util::socket_address::UnixOrTCPSocketAddress; use garage_model::garage::Garage; @@ -37,7 +37,7 @@ pub(crate) struct K2VApiEndpoint { impl K2VApiServer { pub async fn run( garage: Arc<Garage>, - bind_addr: SocketAddr, + bind_addr: UnixOrTCPSocketAddress, s3_region: String, shutdown_signal: impl Future<Output = ()>, ) -> Result<(), GarageError> { |