pub struct SignalRouter { /* private fields */ }Expand description
Signal router: dedup set + urgency-based attention + bounded priority queue.
Implementations§
Source§impl SignalRouter
impl SignalRouter
pub const DEFAULT_DEDUPE_CAPACITY: usize = 256
pub fn new(max_queue_size: usize) -> Self
pub fn with_policy( max_queue_size: usize, ttl_ms: Option<u64>, deadline_escalation: bool, ) -> Self
Sourcepub fn ingest(
&mut self,
signal: RuntimeSignal,
lifecycle: TaskLifecycle,
) -> SignalDisposition
pub fn ingest( &mut self, signal: RuntimeSignal, lifecycle: TaskLifecycle, ) -> SignalDisposition
Ingest a signal. Returns the disposition after dedup + attention evaluation.
Queue dispositions are buffered; if the queue is full, returns Dropped
so the SDK can apply backpressure or surface the loss to telemetry.
All other dispositions are returned directly to the caller.
pub fn ingest_at( &mut self, signal: RuntimeSignal, lifecycle: TaskLifecycle, now_ms: u64, ) -> SignalRouteOutcome
Sourcepub fn expire(&mut self, now_ms: u64) -> Vec<String>
pub fn expire(&mut self, now_ms: u64) -> Vec<String>
Expire queued signals against the journaled clock before either admission or delivery.
Sourcepub fn next(&mut self) -> Option<RuntimeSignal>
pub fn next(&mut self) -> Option<RuntimeSignal>
Pull next queued signal.
Sourcepub fn clear_dedup(&mut self)
pub fn clear_dedup(&mut self)
Clear the dedup set (call at session boundaries to prevent unbounded growth).
Auto Trait Implementations§
impl Freeze for SignalRouter
impl RefUnwindSafe for SignalRouter
impl Send for SignalRouter
impl Sync for SignalRouter
impl Unpin for SignalRouter
impl UnsafeUnpin for SignalRouter
impl UnwindSafe for SignalRouter
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