aboutsummaryrefslogtreecommitdiff
path: root/src/util/config.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-03 18:40:37 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-03 18:40:37 +0200
commit2e656b541b1dd1492798e1ed764fa40868da4d6a (patch)
tree66fbf4c11a248d3c92cf44c4d3f18663670acbbe /src/util/config.rs
parent9ac1d5be0eba1b3b35f7fb2f99fe8df549044197 (diff)
parent1243db87f2090a3302c7c8beb386e68ddf9b66b5 (diff)
downloadgarage-2e656b541b1dd1492798e1ed764fa40868da4d6a.tar.gz
garage-2e656b541b1dd1492798e1ed764fa40868da4d6a.zip
Merge branch 'main' into nextv0.9.0-rc1
Diffstat (limited to 'src/util/config.rs')
-rw-r--r--src/util/config.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util/config.rs b/src/util/config.rs
index cf31c87c..ad5c8e1f 100644
--- a/src/util/config.rs
+++ b/src/util/config.rs
@@ -7,6 +7,7 @@ use std::path::PathBuf;
use serde::{de, Deserialize};
use crate::error::Error;
+use crate::socket_address::UnixOrTCPSocketAddress;
/// Represent the whole configuration
#[derive(Deserialize, Debug, Clone)]
@@ -129,7 +130,7 @@ pub struct DataDir {
#[derive(Deserialize, Debug, Clone)]
pub struct S3ApiConfig {
/// Address and port to bind for api serving
- pub api_bind_addr: Option<SocketAddr>,
+ pub api_bind_addr: Option<UnixOrTCPSocketAddress>,
/// S3 region to use
pub s3_region: String,
/// Suffix to remove from domain name to find bucket. If None,
@@ -141,14 +142,14 @@ pub struct S3ApiConfig {
#[derive(Deserialize, Debug, Clone)]
pub struct K2VApiConfig {
/// Address and port to bind for api serving
- pub api_bind_addr: SocketAddr,
+ pub api_bind_addr: UnixOrTCPSocketAddress,
}
/// Configuration for serving files as normal web server
#[derive(Deserialize, Debug, Clone)]
pub struct WebConfig {
/// Address and port to bind for web serving
- pub bind_addr: SocketAddr,
+ pub bind_addr: UnixOrTCPSocketAddress,
/// Suffix to remove from domain name to find bucket
pub root_domain: String,
}
@@ -157,7 +158,7 @@ pub struct WebConfig {
#[derive(Deserialize, Debug, Clone, Default)]
pub struct AdminConfig {
/// Address and port to bind for admin API serving
- pub api_bind_addr: Option<SocketAddr>,
+ pub api_bind_addr: Option<UnixOrTCPSocketAddress>,
/// Bearer token to use to scrape metrics
pub metrics_token: Option<String>,