cleaned up config manager
This commit is contained in:
parent
1226fafe2c
commit
bf711f8b95
|
|
@ -21,19 +21,11 @@ impl Builder {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn set_config_path(&mut self, path: impl Into<String>) {
|
||||
self.file_path = path.into();
|
||||
}
|
||||
|
||||
pub fn args(mut self, args: Arguments) -> Self {
|
||||
self.args.replace(args);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn set_args(&mut self, args: Arguments) {
|
||||
self.args.replace(args);
|
||||
}
|
||||
|
||||
pub(super) fn build(self) -> Addr<ConfigManager> {
|
||||
ConfigManager::from(self).start()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ use actix::{Message, MessageResponse};
|
|||
#[derive(Message, Debug)]
|
||||
#[rtype(result = "()")]
|
||||
pub enum ConfigManagerOutput {
|
||||
#[allow(dead_code)]
|
||||
ConfigUpdated(String, ConfigValue),
|
||||
}
|
||||
|
||||
|
|
@ -11,7 +12,9 @@ pub enum ConfigManagerOutput {
|
|||
#[rtype(result = "ConfigManagerDataResponse")]
|
||||
pub enum ConfigManagerDataMessage {
|
||||
GetValue(String),
|
||||
#[allow(dead_code)]
|
||||
SetValue(String, Option<ConfigValue>),
|
||||
#[allow(dead_code)]
|
||||
SoftSetValue(String, Option<ConfigValue>),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue