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
This commit is contained in:
mricher
2021-09-28 08:57:20 +02:00
committed by Alex Auvolat
parent 9d44127245
commit e349af13a7
9 changed files with 284 additions and 2 deletions
+10
View File
@@ -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
}