aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authormricher <maximilien.richer@gmail.com>2021-09-28 08:57:20 +0200
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:51:12 +0100
commite349af13a7268d567c1bacc819af5b89c2d4231f (patch)
treeb50fc78efac150bbf3c005c33d39a874c5e37b41 /src/util
parent9d44127245990cc55dbdff5a4bd0a1524348f110 (diff)
downloadgarage-e349af13a7268d567c1bacc819af5b89c2d4231f.tar.gz
garage-e349af13a7268d567c1bacc819af5b89c2d4231f.zip
Update dependencies and add admin module with metrics
- Global dependencies updated in Cargo.lock - New module created in src/admin to host: - the (future) admin REST API - the metric collection - add configuration block No metrics implemented yet
Diffstat (limited to 'src/util')
-rw-r--r--src/util/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/config.rs b/src/util/config.rs
index 19c75478..2d15748f 100644
--- a/src/util/config.rs
+++ b/src/util/config.rs
@@ -73,6 +73,9 @@ pub struct Config {
/// Configuration for serving files as normal web server
pub s3_web: WebConfig,
+
+ /// Configuration for the admin API endpoint
+ pub admin_api: AdminConfig,
}
/// Configuration for S3 api
@@ -96,6 +99,13 @@ pub struct WebConfig {
pub root_domain: String,
}
+/// Configuration for the admin and monitoring HTTP API
+#[derive(Deserialize, Debug, Clone)]
+pub struct AdminConfig {
+ /// Address and port to bind for admin API serving
+ pub bind_addr: SocketAddr,
+}
+
fn default_sled_cache_capacity() -> u64 {
128 * 1024 * 1024
}