From 75419a490f0ef06894428ef338d2ff14de74ccc7 Mon Sep 17 00:00:00 2001 From: JesusPerez Date: Sun, 12 Sep 2021 17:01:14 +0100 Subject: [PATCH] chore: cleanup rules --- src/monitor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/monitor.rs b/src/monitor.rs index 1f644ae..50d463e 100644 --- a/src/monitor.rs +++ b/src/monitor.rs @@ -38,7 +38,7 @@ pub fn write_str_data(output_path: String, data_str: String, msg: String) -> Res } Ok(()) } -pub async fn on_action_server(task: &str, srvr: &str, provider: &str, args: &str, rule: &MonitorRule) -> Result<()> { +pub async fn on_action_server(task: &str, srvr: &str, provider: &str, args: &str, _rule: &MonitorRule) -> Result<()> { let provider_name = ProviderName::set_provider(provider.to_owned()); match provider_name { ProviderName::upcloud => { @@ -54,7 +54,7 @@ pub async fn on_action_server(task: &str, srvr: &str, provider: &str, args: &str _ => Err(anyhow!("Provider {} not defined", &provider_name)) } } -pub async fn on_action_notify(chnl: &str, msg: &str, args: &str, rule: &MonitorRule) -> Result<()> { +pub async fn on_action_notify(_chnl: &str, _msg: &str, _args: &str, _rule: &MonitorRule) -> Result<()> { Ok(()) } fn get_server(target: &str, val: &str) -> String { @@ -88,7 +88,7 @@ pub fn on_monitor_operator(operator: &RuleOperator, target: &str, value: &str) - RuleOperator::NotContains => !target.contains(value), } } -pub async fn on_server_rule(srvr: &str, out_cmd: &str, rule: &MonitorRule) -> Result<()> { +pub async fn on_server_rule(_srvr: &str, _out_cmd: &str, _rule: &MonitorRule) -> Result<()> { Ok(()) } pub async fn on_service_rule(srvc: &str, out_cmd: &str, rule: &MonitorRule) -> Result<()> { @@ -104,7 +104,7 @@ pub async fn on_service_rule(srvc: &str, out_cmd: &str, rule: &MonitorRule) -> R } Ok(()) } -pub async fn on_ip_rule(ip: &str, out_cmd: &str, rule: &MonitorRule) -> Result<()> { +pub async fn on_ip_rule(_ip: &str, _out_cmd: &str, _rule: &MonitorRule) -> Result<()> { // tokio::spawn(async move {run_on_rule(rule.to_owned()).await; }); Ok(())