26 lines
652 B
Rust
26 lines
652 B
Rust
use async_trait::async_trait;
|
|
|
|
use crate::{
|
|
inventory::Inventory,
|
|
topology::{
|
|
PreparationError, PreparationOutcome,
|
|
oberservability::monitoring::{AlertReceiver, AlertSender},
|
|
},
|
|
};
|
|
|
|
#[async_trait]
|
|
pub trait PrometheusMonitoring<S: AlertSender> {
|
|
async fn install_prometheus(
|
|
&self,
|
|
sender: &S,
|
|
inventory: &Inventory,
|
|
receivers: Option<Vec<Box<dyn AlertReceiver<S>>>>,
|
|
) -> Result<PreparationOutcome, PreparationError>;
|
|
|
|
async fn ensure_prometheus_operator(
|
|
&self,
|
|
sender: &S,
|
|
inventory: &Inventory,
|
|
) -> Result<PreparationOutcome, PreparationError>;
|
|
}
|