summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 58043c2..9605361 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -8,6 +8,7 @@ pub struct Config {
8 pub serveraddr: String, 8 pub serveraddr: String,
9 pub pingtimeout: i64, 9 pub pingtimeout: i64,
10 pub pingthreshold: i64, 10 pub pingthreshold: i64,
11 pub timeoffset: i8,
11} 12}
12 13
13impl Config { 14impl Config {
@@ -16,6 +17,7 @@ impl Config {
16 .set_default("serveraddr", "0.0.0.0:7229")? 17 .set_default("serveraddr", "0.0.0.0:7229")?
17 .set_default("pingtimeout", 10)? 18 .set_default("pingtimeout", 10)?
18 .set_default("pingthreshold", 1)? 19 .set_default("pingthreshold", 1)?
20 .set_default("timeoffset", 0)?
19 .add_source(File::with_name("config.toml").required(false)) 21 .add_source(File::with_name("config.toml").required(false))
20 .add_source(File::with_name("config.dev.toml").required(false)) 22 .add_source(File::with_name("config.dev.toml").required(false))
21 .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_")) 23 .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_"))