Refactor OPNSense module to use a mod.rs structure and add an OPNsenseLaunchUpgrade score for launching firmware upgrades.
21 lines
572 B
Rust
21 lines
572 B
Rust
use harmony::{
|
|
inventory::Inventory,
|
|
maestro::Maestro,
|
|
modules::{dummy::{ErrorScore, PanicScore, SuccessScore}, k8s::deployment::K8sDeploymentScore},
|
|
topology::HAClusterTopology,
|
|
};
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let inventory = Inventory::autoload();
|
|
let topology = HAClusterTopology::autoload();
|
|
let mut maestro = Maestro::new(inventory, topology);
|
|
|
|
maestro.register_all(vec![
|
|
Box::new(SuccessScore {}),
|
|
Box::new(ErrorScore {}),
|
|
Box::new(PanicScore {}),
|
|
]);
|
|
harmony_tui::init(maestro).await.unwrap();
|
|
}
|