pub struct InMemoryWorkflowTriggerRegistry { /* private fields */ }Expand description
In-memory registry. One HashMap<agent_id, Vec<TriggerBinding>>
plus secondary indices for the hot lookups. The Redis impl
follows a similar layout but keys per trigger kind.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryWorkflowTriggerRegistry
impl Default for InMemoryWorkflowTriggerRegistry
Source§fn default() -> InMemoryWorkflowTriggerRegistry
fn default() -> InMemoryWorkflowTriggerRegistry
Returns the “default value” for a type. Read more
Source§impl WorkflowTriggerRegistry for InMemoryWorkflowTriggerRegistry
impl WorkflowTriggerRegistry for InMemoryWorkflowTriggerRegistry
Source§fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
workspace_id: Option<&'life2 str>,
def: &'life3 WorkflowDefinition,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn register<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
workspace_id: Option<&'life2 str>,
def: &'life3 WorkflowDefinition,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Register all triggers from an agent’s workflow definition.
Overwrites any previous bindings for this agent (call after
upsert).
workspace_id is the tenant the agent belongs to
(cloud); None for OSS.Source§fn unregister<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister<'life0, 'life1, 'async_trait>(
&'life0 self,
agent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove all bindings for an agent.
Source§fn find_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve the binding for a
Webhook { path } trigger. The
webhook HTTP route maps /v1/workflows/webhook/{path} here.
First-match wins when multiple tenants declare the same path.Source§fn find_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve the binding for a
Tool { name } trigger (workflow
exposed as an A2A skill).Source§fn find_event<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_event<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
All bindings for an
Event { topic } trigger. Returns every
subscriber so the event bus can fan-out.Source§fn list_schedules<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_schedules<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TriggerBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
All bindings that are
Schedule { … } triggers. The
scheduler tick walks this list each interval and fires due
runs.Auto Trait Implementations§
impl !Freeze for InMemoryWorkflowTriggerRegistry
impl RefUnwindSafe for InMemoryWorkflowTriggerRegistry
impl Send for InMemoryWorkflowTriggerRegistry
impl Sync for InMemoryWorkflowTriggerRegistry
impl Unpin for InMemoryWorkflowTriggerRegistry
impl UnsafeUnpin for InMemoryWorkflowTriggerRegistry
impl UnwindSafe for InMemoryWorkflowTriggerRegistry
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