use std::collections::HashMap; use harmony::{ inventory::Inventory, modules::monitoring::{ alert_channel::discord_alert_channel::DiscordWebhook, okd::cluster_monitoring::OpenshiftClusterAlertScore, }, topology::K8sAnywhereTopology, }; use harmony_macros::hurl; use harmony_types::k8s_name::K8sName; #[tokio::main] async fn main() { let mut sel = HashMap::new(); sel.insert( "openshift_io_alert_source".to_string(), "platform".to_string(), ); let mut sel2 = HashMap::new(); sel2.insert("openshift_io_alert_source".to_string(), "".to_string()); let selectors = vec![sel, sel2]; harmony_cli::run( Inventory::autoload(), K8sAnywhereTopology::from_env(), vec![Box::new(OpenshiftClusterAlertScore { receivers: vec![Box::new(DiscordWebhook { name: K8sName("wills-discord-webhook-example".to_string()), url: hurl!("https://something.io"), selectors: selectors, })], })], None, ) .await .unwrap(); }