forked from MightyPork/group-actor
wip translation system
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
use crate::tr::TranslationTable;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct CommonConfig {
|
||||
@@ -21,6 +24,8 @@ pub struct CommonConfig {
|
||||
/// Time after which a socket is always closed, even if seemingly alive.
|
||||
/// This is a work-around for servers that stop sending notifs after a while.
|
||||
pub socket_retire_time_s: f64,
|
||||
#[serde(skip)]
|
||||
pub tr : HashMap<String, TranslationTable>,
|
||||
}
|
||||
|
||||
impl Default for CommonConfig {
|
||||
@@ -34,6 +39,7 @@ impl Default for CommonConfig {
|
||||
delay_reopen_error_s: 5.0,
|
||||
socket_alive_timeout_s: 30.0,
|
||||
socket_retire_time_s: 120.0,
|
||||
tr: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user