rsigma_runtime/alert_pipeline/state.rs
1//! The alert pipeline's mutable runtime state.
2//!
3//! Bundles the per-stage stores so the sink task owns one value (and shares one
4//! `RwLock` with the admin API) rather than threading a store per stage. The
5//! dedup store is sink-task-private in practice, but lives here so it persists
6//! alongside the incident and silence state.
7
8use super::dedup::DedupStore;
9use super::grouping::IncidentStore;
10use super::inhibit::InhibitStore;
11use super::silence::SilenceStore;
12
13/// All mutable alert-pipeline state, owned by the sink task and shared behind
14/// an `RwLock` with the `/api/v1/incidents` and `/api/v1/silences` handlers.
15#[derive(Debug, Default)]
16pub struct AlertPipelineState {
17 /// Active-alert dedup store.
18 pub dedup: DedupStore,
19 /// Open incidents from the grouping stage.
20 pub incidents: IncidentStore,
21 /// Operator silences (static + API).
22 pub silences: SilenceStore,
23 /// Inhibition active-source index.
24 pub inhibit: InhibitStore,
25}