pub struct ReconciliationController { /* private fields */ }Expand description
Reconciliation controller: desired state vs actual state.
Registered as a SystemService with ServiceType::Core.
Runs a background tick every interval to detect and correct
drift between desired and actual process states.
Implementations§
Source§impl ReconciliationController
impl ReconciliationController
Sourcepub fn new(
process_table: Arc<ProcessTable>,
interval: Duration,
) -> ReconciliationController
pub fn new( process_table: Arc<ProcessTable>, interval: Duration, ) -> ReconciliationController
Create a new reconciliation controller.
Sourcepub fn set_chain_manager(&mut self, cm: Arc<ChainManager>)
pub fn set_chain_manager(&mut self, cm: Arc<ChainManager>)
Attach a chain manager for exochain audit logging.
Sourcepub fn set_desired(&self, key: String, state: DesiredAgentState)
pub fn set_desired(&self, key: String, state: DesiredAgentState)
Set desired state for an agent.
Sourcepub fn remove_desired(&self, key: &str) -> Option<DesiredAgentState>
pub fn remove_desired(&self, key: &str) -> Option<DesiredAgentState>
Remove desired state for an agent.
Sourcepub fn list_desired(&self) -> Vec<DesiredAgentState>
pub fn list_desired(&self) -> Vec<DesiredAgentState>
Get all desired states.
Sourcepub async fn recent_drifts(&self) -> Vec<DriftEvent>
pub async fn recent_drifts(&self) -> Vec<DriftEvent>
Get recent drift events.
Sourcepub async fn tick(&self) -> Vec<DriftEvent>
pub async fn tick(&self) -> Vec<DriftEvent>
Run a single reconciliation tick.
Compares desired state against process table and returns detected drifts. Does NOT take corrective action (that requires a supervisor reference and governance gate).
Sourcepub async fn record_action(&self, event: DriftEvent)
pub async fn record_action(&self, event: DriftEvent)
Record a corrective action in drift history.
Sourcepub fn clear_desired(&self)
pub fn clear_desired(&self)
Clear all desired state (used during shutdown).
Sourcepub fn desired_count(&self) -> usize
pub fn desired_count(&self) -> usize
Get the number of desired agent entries.
Auto Trait Implementations§
impl !RefUnwindSafe for ReconciliationController
impl !UnwindSafe for ReconciliationController
impl Freeze for ReconciliationController
impl Send for ReconciliationController
impl Sync for ReconciliationController
impl Unpin for ReconciliationController
impl UnsafeUnpin for ReconciliationController
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more