pub struct SignalGateway { /* private fields */ }Expand description
Entry point for all external signals into the agent.
- Cron scheduling: fires
ScheduledPrompts at the right wall-clock time - Webhook ingestion: push any
RuntimeSignaldirectly viaingest - Subscribe pattern: callers receive signals via
subscribe
Implementations§
Source§impl SignalGateway
impl SignalGateway
pub fn new() -> Self
Sourcepub fn subscribe(&self) -> GatewayReceiver
pub fn subscribe(&self) -> GatewayReceiver
Subscribe to all signals emitted by this gateway.
Returns a GatewayReceiver that implements SignalSource.
Sourcepub fn schedule(&self, prompt: ScheduledPrompt)
pub fn schedule(&self, prompt: ScheduledPrompt)
Schedule a ScheduledPrompt to fire at its run_at_ms. Idempotent by goal+time.
Sourcepub fn ingest(&self, signal: RuntimeSignal)
pub fn ingest(&self, signal: RuntimeSignal)
Ingest a raw external signal (e.g. from a webhook handler).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SignalGateway
impl !RefUnwindSafe for SignalGateway
impl !UnwindSafe for SignalGateway
impl Send for SignalGateway
impl Sync for SignalGateway
impl Unpin for SignalGateway
impl UnsafeUnpin for SignalGateway
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