fix(cli): simplify running the CLI by hiding the maestro init inside the implemtation
All checks were successful
Run Check Script / check (pull_request) Successful in -31s

This commit is contained in:
Ian Letourneau
2025-07-31 15:37:06 -04:00
parent 06aab1f57f
commit 4ac74bc862
9 changed files with 67 additions and 62 deletions

View File

@@ -2,7 +2,6 @@ use std::collections::HashMap;
use harmony::{
inventory::Inventory,
maestro::Maestro,
modules::{
monitoring::{
alert_channel::discord_alert_channel::DiscordWebhook,
@@ -74,13 +73,13 @@ async fn main() {
rules: vec![Box::new(additional_rules), Box::new(additional_rules2)],
service_monitors: vec![service_monitor],
};
let mut maestro = Maestro::<K8sAnywhereTopology>::initialize(
Inventory::autoload(),
harmony_cli::run(
K8sAnywhereTopology::from_env(),
Inventory::autoload(),
vec![Box::new(alerting_score)],
None,
)
.await
.unwrap();
maestro.register_all(vec![Box::new(alerting_score)]);
harmony_cli::init(maestro, None).await.unwrap();
}