diff options
author | Alex Auvolat <alex@adnab.me> | 2022-03-10 10:51:40 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-14 10:54:25 +0100 |
commit | 9b2b531f4d8d62897b0dc3f8691608a9298a2f85 (patch) | |
tree | d50f7e9cf71427132caee12c00b0beebc2964523 /src/util/config.rs | |
parent | a19341b1885b87ab2ac0ee6fa8c19ba2fca5e3fc (diff) | |
download | garage-9b2b531f4d8d62897b0dc3f8691608a9298a2f85.tar.gz garage-9b2b531f4d8d62897b0dc3f8691608a9298a2f85.zip |
Make admin server optional
Diffstat (limited to 'src/util/config.rs')
-rw-r--r-- | src/util/config.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/config.rs b/src/util/config.rs index 7e8d4ba6..f74a62d0 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -75,6 +75,7 @@ pub struct Config { pub s3_web: WebConfig, /// Configuration for the admin API endpoint + #[serde(default = "Default::default")] pub admin: AdminConfig, } @@ -100,10 +101,10 @@ pub struct WebConfig { } /// Configuration for the admin and monitoring HTTP API -#[derive(Deserialize, Debug, Clone)] +#[derive(Deserialize, Debug, Clone, Default)] pub struct AdminConfig { /// Address and port to bind for admin API serving - pub api_bind_addr: SocketAddr, + pub api_bind_addr: Option<SocketAddr>, /// OTLP server to where to export traces pub trace_sink: Option<String>, } |