pub struct ChangeEvent {
pub event_id: String,
pub detected_at_unix_secs: u64,
pub affected_target: String,
pub classification: ChangeClassification,
pub delta_summary: DeltaSummary,
pub vendor_hint: Option<VendorId>,
pub target_class: Option<TargetClass>,
pub recommended_mitigation_path: MitigationPath,
pub evidence: BTreeMap<String, String>,
}Expand description
A single change-feed event.
One ChangeEvent is emitted per Suspected
/ Probable target per detection cycle. The
event_id is stable so downstream tooling can
dedupe by ID without depending on order.
Fields§
§event_id: StringStable event identifier —
cf-<detected_at_unix_secs>-<affected_target>.
detected_at_unix_secs: u64Wall-clock timestamp the event was assembled.
affected_target: StringTarget the event applies to (domain).
classification: ChangeClassificationClassification band the detector assigned.
delta_summary: DeltaSummaryPer-target delta summary.
vendor_hint: Option<VendorId>Optional vendor hint preserved from the upstream deltas.
target_class: Option<TargetClass>Optional target class preserved from the upstream deltas.
recommended_mitigation_path: MitigationPathRunbook mitigation pointer.
evidence: BTreeMap<String, String>Structured evidence preserved verbatim from
the upstream deltas. Keys are namespaced
by source (e.g. canary.baseline_score).
Implementations§
Source§impl ChangeEvent
impl ChangeEvent
Sourcepub fn new(
affected_target: impl Into<String>,
classification: ChangeClassification,
delta_summary: DeltaSummary,
vendor_hint: Option<VendorId>,
target_class: Option<TargetClass>,
recommended_mitigation_path: MitigationPath,
evidence: BTreeMap<String, String>,
) -> Self
pub fn new( affected_target: impl Into<String>, classification: ChangeClassification, delta_summary: DeltaSummary, vendor_hint: Option<VendorId>, target_class: Option<TargetClass>, recommended_mitigation_path: MitigationPath, evidence: BTreeMap<String, String>, ) -> Self
Build a new event. The event_id is generated
deterministically from
cf-<detected_at_unix_secs>-<affected_target>
so downstream consumers can dedupe without
trusting insertion order.
Sourcepub fn new_at(
detected_at_unix_secs: u64,
affected_target: impl Into<String>,
classification: ChangeClassification,
delta_summary: DeltaSummary,
vendor_hint: Option<VendorId>,
target_class: Option<TargetClass>,
recommended_mitigation_path: MitigationPath,
evidence: BTreeMap<String, String>,
) -> Self
pub fn new_at( detected_at_unix_secs: u64, affected_target: impl Into<String>, classification: ChangeClassification, delta_summary: DeltaSummary, vendor_hint: Option<VendorId>, target_class: Option<TargetClass>, recommended_mitigation_path: MitigationPath, evidence: BTreeMap<String, String>, ) -> Self
Build a new event with an explicit wall-clock timestamp. Useful for deterministic tests and for callers that hold their own clock.
Trait Implementations§
Source§impl Clone for ChangeEvent
impl Clone for ChangeEvent
Source§fn clone(&self) -> ChangeEvent
fn clone(&self) -> ChangeEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more