pub struct GovernanceMonitor {
pub pipeline: GovernancePipeline,
pub obligations: ObligationManager,
pub temporal_monitors: Vec<TemporalMonitor>,
pub current_time: u64,
}Expand description
The full continuous governance engine.
This is the system-level entry point for long-running governance over event streams. Combine with your event bus or message queue.
Fields§
§pipeline: GovernancePipeline§obligations: ObligationManager§temporal_monitors: Vec<TemporalMonitor>§current_time: u64Implementations§
Source§impl GovernanceMonitor
impl GovernanceMonitor
pub fn new(pipeline: GovernancePipeline) -> GovernanceMonitor
Sourcepub fn tick(&mut self, now: u64) -> Vec<ObligationViolationEvent>
pub fn tick(&mut self, now: u64) -> Vec<ObligationViolationEvent>
Advance logical time and process all deadline checks.
Sourcepub fn track_obligation(&mut self, ob: Obligation)
pub fn track_obligation(&mut self, ob: Obligation)
Register a new obligation to be tracked.
Sourcepub fn action_completed(
&mut self,
agent: &str,
action: &str,
) -> Vec<ObligationViolationEvent>
pub fn action_completed( &mut self, agent: &str, action: &str, ) -> Vec<ObligationViolationEvent>
Notify that an action was completed (may satisfy obligations).
Sourcepub fn stats(&self) -> MonitorStats
pub fn stats(&self) -> MonitorStats
Query current governance stats.
Auto Trait Implementations§
impl Freeze for GovernanceMonitor
impl RefUnwindSafe for GovernanceMonitor
impl Send for GovernanceMonitor
impl Sync for GovernanceMonitor
impl Unpin for GovernanceMonitor
impl UnsafeUnpin for GovernanceMonitor
impl UnwindSafe for GovernanceMonitor
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