diff --git a/defaults.toml b/defaults.toml index f90a603..3938649 100644 --- a/defaults.toml +++ b/defaults.toml @@ -4,7 +4,6 @@ read_only = false max_file_count = 1 [client] -pool_size = 100 timeout = 30 [tracing.logging] @@ -21,9 +20,6 @@ targets = "info" [metrics] [old_repo] -path = "/mnt/sled-repo" -cache_capacity = 67108864 -export_path = "/mnt/exports" [media] external_validation_timeout = 30 diff --git a/pict-rs.toml b/pict-rs.toml index 90ec4ce..b8ea222 100644 --- a/pict-rs.toml +++ b/pict-rs.toml @@ -19,13 +19,6 @@ max_file_count = 1 ## Client configuration [client] -## Optional: connection pool size for internal http client -# environment variable: PICTRS__CLIENT__POOL_SIZE -# default: 100 -# -# Sets the maximum number of allowed idle connections per-host. -pool_size = 100 - ## Optional: time (in seconds) the client will wait for a response before giving up # environment variable: PICTRS__CLIENT__TIMEOUT # default: 30 @@ -135,11 +128,6 @@ prometheus_address = "0.0.0.0:9000" # default: /mnt/sled-repo path = '/mnt/sled-repo' -## Optional: in-memory cache capacity for sled data (in bytes) -# environment variable: PICTRS__OLD_REPO__CACHE_CAPACITY -# default: 67,108,864 (1024 * 1024 * 64, or 64MB) -cache_capacity = 67108864 - ## Media Processing Configuration [media] diff --git a/src/config/file.rs b/src/config/file.rs index 846b5cf..7944970 100644 --- a/src/config/file.rs +++ b/src/config/file.rs @@ -18,6 +18,7 @@ pub(crate) struct ConfigFile { #[serde(default)] pub(crate) metrics: Metrics, + #[serde(default)] old_repo: OldRepo, pub(crate) media: Media, @@ -424,7 +425,7 @@ impl Media { } } -#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] +#[derive(Clone, Debug, Default, serde::Deserialize, serde::Serialize)] #[serde(rename_all = "snake_case")] pub(crate) struct OldRepo { pub(crate) path: Option,