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.
This commit is contained in:
networkException
2023-09-29 18:41:00 +02:00
parent 7353038a64
commit 8ec6a53b35
6 changed files with 108 additions and 28 deletions
+2 -2
View File
@@ -1,5 +1,4 @@
use std::collections::HashMap;
use std::net::SocketAddr;
use std::sync::Arc;
use async_trait::async_trait;
@@ -18,6 +17,7 @@ use prometheus::{Encoder, TextEncoder};
use garage_model::garage::Garage;
use garage_rpc::system::ClusterHealthStatus;
use garage_util::error::Error as GarageError;
use garage_util::socket_address::UnixOrTCPSocketAddress;
use crate::generic_server::*;
@@ -61,7 +61,7 @@ impl AdminApiServer {
pub async fn run(
self,
bind_addr: SocketAddr,
bind_addr: UnixOrTCPSocketAddress,
shutdown_signal: impl Future<Output = ()>,
) -> Result<(), GarageError> {
let region = self.garage.config.s3_api.s3_region.clone();