0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 05:58:21 -05:00

feat: provide functionality to parse the new config option

This commit is contained in:
neon_arch 2023-07-30 10:52:03 +03:00
parent d3007e3e88
commit 6d3396b6f9

View File

@ -32,6 +32,7 @@ pub struct Config {
pub logging: bool, pub logging: bool,
pub debug: bool, pub debug: bool,
pub upstream_search_engines: Vec<String>, pub upstream_search_engines: Vec<String>,
pub request_timeout: u8,
} }
/// Configuration options for the aggregator. /// Configuration options for the aggregator.
@ -80,6 +81,7 @@ impl Config {
.into_iter() .into_iter()
.filter_map(|(key, value)| value.then_some(key)) .filter_map(|(key, value)| value.then_some(key))
.collect(), .collect(),
request_timeout: globals.get::<_, u8>("request_timeout")?,
}) })
}) })
} }