diff --git a/Cargo.lock b/Cargo.lock index c571489..692223a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -823,6 +823,7 @@ dependencies = [ "env_logger", "harmony", "harmony_macros", + "harmony_tui", "harmony_types", "log", "tokio", diff --git a/examples/lamp/Cargo.toml b/examples/lamp/Cargo.toml index 1bdcf68..902548e 100644 --- a/examples/lamp/Cargo.toml +++ b/examples/lamp/Cargo.toml @@ -8,7 +8,7 @@ publish = false [dependencies] harmony = { path = "../../harmony" } -#harmony_tui = { path = "../../harmony_tui" } +harmony_tui = { path = "../../harmony_tui" } harmony_types = { path = "../../harmony_types" } cidr = { workspace = true } tokio = { workspace = true } diff --git a/examples/lamp/src/main.rs b/examples/lamp/src/main.rs index 7277aa5..bdf0f38 100644 --- a/examples/lamp/src/main.rs +++ b/examples/lamp/src/main.rs @@ -1,8 +1,5 @@ use harmony::{ - data::Version, - maestro::Maestro, - modules::lamp::{LAMPConfig, LAMPScore}, - topology::{HAClusterTopology, Url}, + data::Version, inventory::Inventory, maestro::Maestro, modules::lamp::{LAMPConfig, LAMPScore}, topology::{HAClusterTopology, Url} }; #[tokio::main] @@ -17,8 +14,9 @@ async fn main() { }, }; - Maestro::::load_from_env() - .interpret(Box::new(lamp_stack)) - .await - .unwrap(); + let inventory = Inventory::autoload(); + let topology = HAClusterTopology::autoload(); + let mut maestro = Maestro::new(inventory, topology); + maestro.register_all(vec![Box::new(lamp_stack)]); + harmony_tui::init(maestro).await.unwrap(); }