aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-07 17:54:16 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-07 17:54:16 +0200
commit2559f63e9bb58a66da70f33e852ebbd5f909876e (patch)
treec052d8d8978acd1396e3559015d0212fb1dbeb33 /src/util
parent28d86e76021bed674ca78684b9522cfb664a8ae2 (diff)
downloadgarage-2559f63e9bb58a66da70f33e852ebbd5f909876e.tar.gz
garage-2559f63e9bb58a66da70f33e852ebbd5f909876e.zip
Make all HTTP services optionnal
Diffstat (limited to 'src/util')
-rw-r--r--src/util/config.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/util/config.rs b/src/util/config.rs
index e8ef4fdd..46c5cb9d 100644
--- a/src/util/config.rs
+++ b/src/util/config.rs
@@ -81,11 +81,10 @@ pub struct Config {
pub s3_api: S3ApiConfig,
/// Configuration for K2V api
- #[cfg(feature = "k2v")]
pub k2v_api: Option<K2VApiConfig>,
/// Configuration for serving files as normal web server
- pub s3_web: WebConfig,
+ pub s3_web: Option<WebConfig>,
/// Configuration for the admin API endpoint
#[serde(default = "Default::default")]
@@ -96,7 +95,7 @@ pub struct Config {
#[derive(Deserialize, Debug, Clone)]
pub struct S3ApiConfig {
/// Address and port to bind for api serving
- pub api_bind_addr: SocketAddr,
+ pub api_bind_addr: Option<SocketAddr>,
/// S3 region to use
pub s3_region: String,
/// Suffix to remove from domain name to find bucket. If None,
@@ -105,7 +104,6 @@ pub struct S3ApiConfig {
}
/// Configuration for K2V api
-#[cfg(feature = "k2v")]
#[derive(Deserialize, Debug, Clone)]
pub struct K2VApiConfig {
/// Address and port to bind for api serving