pub struct LoggingDispatcher { /* private fields */ }Expand description
Logging-only dispatcher. Records every admitted action in an
internal Mutex<Vec<MeshOsAction>> and returns Ok(()).
Useful for bootstrap (before real subsystem wiring lands) +
the executor’s unit tests.
Implementations§
Source§impl LoggingDispatcher
impl LoggingDispatcher
Sourcepub fn log(&self) -> Vec<MeshOsAction>
pub fn log(&self) -> Vec<MeshOsAction>
Snapshot of the actions dispatched so far.
Sourcepub fn fail_next(&self, err: DispatchError)
pub fn fail_next(&self, err: DispatchError)
Inject an error to surface on the next dispatch call.
Used by tests to exercise the retry / drop paths.
Sourcepub fn backpressure_log(&self) -> Vec<ClusterBackpressureChange>
pub fn backpressure_log(&self) -> Vec<ClusterBackpressureChange>
Snapshot of the cluster-backpressure transitions the
executor has surfaced through on_cluster_backpressure.
Trait Implementations§
Source§impl ActionDispatcher for LoggingDispatcher
impl ActionDispatcher for LoggingDispatcher
Source§fn dispatch<'a>(
&'a self,
action: MeshOsAction,
) -> BoxFuture<'a, Result<(), DispatchError>>
fn dispatch<'a>( &'a self, action: MeshOsAction, ) -> BoxFuture<'a, Result<(), DispatchError>>
Dispatch an admitted action. Errors record on the
recent-failures ring buffer; the action is not retried
(admit / defer is the retry surface).
Source§fn on_cluster_backpressure(&self, change: ClusterBackpressureChange)
fn on_cluster_backpressure(&self, change: ClusterBackpressureChange)
Cluster-wide backpressure flag transitioned. The executor
invokes this once per edge crossing —
Asserted when the
action-queue depth crosses the high-water mark, Released
when it drops below the low-water mark. Production
dispatchers fan DaemonControl::BackpressureOn { level } /
DaemonControl::BackpressureOff out to supervised daemons
so they can shed optional work. Default impl is a no-op —
dispatchers that don’t supervise daemons (e.g. the test
logger) can ignore the hook.Source§impl Debug for LoggingDispatcher
impl Debug for LoggingDispatcher
Source§impl Default for LoggingDispatcher
impl Default for LoggingDispatcher
Source§fn default() -> LoggingDispatcher
fn default() -> LoggingDispatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for LoggingDispatcher
impl !RefUnwindSafe for LoggingDispatcher
impl Send for LoggingDispatcher
impl Sync for LoggingDispatcher
impl Unpin for LoggingDispatcher
impl UnsafeUnpin for LoggingDispatcher
impl UnwindSafe for LoggingDispatcher
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