feat: example-lamp now uses harmony-tui
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -823,6 +823,7 @@ dependencies = [
|
|||||||
"env_logger",
|
"env_logger",
|
||||||
"harmony",
|
"harmony",
|
||||||
"harmony_macros",
|
"harmony_macros",
|
||||||
|
"harmony_tui",
|
||||||
"harmony_types",
|
"harmony_types",
|
||||||
"log",
|
"log",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ publish = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
harmony = { path = "../../harmony" }
|
harmony = { path = "../../harmony" }
|
||||||
#harmony_tui = { path = "../../harmony_tui" }
|
harmony_tui = { path = "../../harmony_tui" }
|
||||||
harmony_types = { path = "../../harmony_types" }
|
harmony_types = { path = "../../harmony_types" }
|
||||||
cidr = { workspace = true }
|
cidr = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
use harmony::{
|
use harmony::{
|
||||||
data::Version,
|
data::Version, inventory::Inventory, maestro::Maestro, modules::lamp::{LAMPConfig, LAMPScore}, topology::{HAClusterTopology, Url}
|
||||||
maestro::Maestro,
|
|
||||||
modules::lamp::{LAMPConfig, LAMPScore},
|
|
||||||
topology::{HAClusterTopology, Url},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@@ -17,8 +14,9 @@ async fn main() {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Maestro::<HAClusterTopology>::load_from_env()
|
let inventory = Inventory::autoload();
|
||||||
.interpret(Box::new(lamp_stack))
|
let topology = HAClusterTopology::autoload();
|
||||||
.await
|
let mut maestro = Maestro::new(inventory, topology);
|
||||||
.unwrap();
|
maestro.register_all(vec![Box::new(lamp_stack)]);
|
||||||
|
harmony_tui::init(maestro).await.unwrap();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user