pub struct BranchMonitor { /* private fields */ }Implementations§
Source§impl BranchMonitor
impl BranchMonitor
pub fn new(node_id: &str) -> Self
Sourcepub fn with_sink(self, sink: SharedSink) -> Self
pub fn with_sink(self, sink: SharedSink) -> Self
Attach an observation sink (JSON Lines, OTel, database adapter, …).
Sourcepub fn record_failure_observation(&self, observation: ReliabilityObservation)
pub fn record_failure_observation(&self, observation: ReliabilityObservation)
Record an immutable failure observation for offline analysis. Lightweight: does not run statistics, query databases, or call AI.
pub fn with_sla(node_id: &str, sla_tracker: Arc<Mutex<SlaTracker>>) -> Self
pub fn with_chaos(node_id: &str, chaos: Arc<Mutex<ChaosController>>) -> Self
pub fn record_branch(&mut self, outcome: &str, declared_probability: f64)
pub fn record_failure( &mut self, operation_id: &str, error: &dyn Error, declared_probability: Option<f64>, )
pub fn flush(&self)
Trait Implementations§
Source§impl Drop for BranchMonitor
impl Drop for BranchMonitor
Auto Trait Implementations§
impl !RefUnwindSafe for BranchMonitor
impl !UnwindSafe for BranchMonitor
impl Freeze for BranchMonitor
impl Send for BranchMonitor
impl Sync for BranchMonitor
impl Unpin for BranchMonitor
impl UnsafeUnpin for BranchMonitor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more