chore: Move large score to function
This commit is contained in:
parent
27f6ed97f9
commit
3e032b79f6
@ -22,6 +22,18 @@ async fn main() {
|
||||
let topology = HAClusterTopology::autoload();
|
||||
let mut maestro = Maestro::new(inventory, topology);
|
||||
|
||||
|
||||
maestro.register_all(vec![
|
||||
Box::new(SuccessScore {}),
|
||||
Box::new(ErrorScore {}),
|
||||
Box::new(PanicScore {}),
|
||||
Box::new(DnsScore::new(vec![], None)),
|
||||
Box::new(build_large_score()),
|
||||
]);
|
||||
harmony_tui::init(maestro).await.unwrap();
|
||||
}
|
||||
|
||||
fn build_large_score() -> LoadBalancerScore {
|
||||
let backend_server = BackendServer {
|
||||
address: "192.168.0.0".to_string(),
|
||||
port: 342,
|
||||
@ -40,7 +52,7 @@ async fn main() {
|
||||
HttpStatusCode::Success2xx,
|
||||
)),
|
||||
};
|
||||
let okd_lbscore = LoadBalancerScore {
|
||||
LoadBalancerScore {
|
||||
public_services: vec![
|
||||
lb_service.clone(),
|
||||
lb_service.clone(),
|
||||
@ -57,14 +69,5 @@ async fn main() {
|
||||
lb_service.clone(),
|
||||
lb_service.clone(),
|
||||
],
|
||||
};
|
||||
|
||||
maestro.register_all(vec![
|
||||
Box::new(SuccessScore {}),
|
||||
Box::new(ErrorScore {}),
|
||||
Box::new(PanicScore {}),
|
||||
Box::new(DnsScore::new(vec![], None)),
|
||||
Box::new(okd_lbscore),
|
||||
]);
|
||||
harmony_tui::init(maestro).await.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user