cleaned up config manager

This commit is contained in:
michael-bailey 2022-09-15 08:19:54 +01:00
parent 1226fafe2c
commit bf711f8b95
2 changed files with 3 additions and 8 deletions

View File

@ -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()
}

View File

@ -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>),
}