pub struct ExternalIntegrationRegistry { /* private fields */ }Expand description
External integration registry.
Implementations§
Source§impl ExternalIntegrationRegistry
impl ExternalIntegrationRegistry
Sourcepub async fn register_callback(&self, handler: Arc<dyn CallbackHandler>)
pub async fn register_callback(&self, handler: Arc<dyn CallbackHandler>)
Register a callback handler.
Sourcepub async fn dispatch_callback(&self, payload: CallbackPayload) -> Result<()>
pub async fn dispatch_callback(&self, payload: CallbackPayload) -> Result<()>
Dispatch a callback to all registered handlers.
Sourcepub fn webhooks(&self) -> &Arc<WebhookRegistry>
pub fn webhooks(&self) -> &Arc<WebhookRegistry>
Get the webhook registry.
Sourcepub async fn register_emitter(&self, emitter: Arc<dyn EventEmitter>)
pub async fn register_emitter(&self, emitter: Arc<dyn EventEmitter>)
Register an event emitter.
Sourcepub async fn emit_event(&self, event: ExternalEvent) -> Result<()>
pub async fn emit_event(&self, event: ExternalEvent) -> Result<()>
Emit an event to all registered emitters.
Sourcepub async fn emit_workflow_started(&self, state: &WorkflowState) -> Result<()>
pub async fn emit_workflow_started(&self, state: &WorkflowState) -> Result<()>
Emit workflow started event.
Sourcepub async fn emit_workflow_completed(&self, state: &WorkflowState) -> Result<()>
pub async fn emit_workflow_completed(&self, state: &WorkflowState) -> Result<()>
Emit workflow completed event.
Sourcepub async fn emit_workflow_failed(
&self,
state: &WorkflowState,
error: &str,
) -> Result<()>
pub async fn emit_workflow_failed( &self, state: &WorkflowState, error: &str, ) -> Result<()>
Emit workflow failed event.
Sourcepub async fn emit_task_started(
&self,
workflow_id: &str,
task: &TaskState,
) -> Result<()>
pub async fn emit_task_started( &self, workflow_id: &str, task: &TaskState, ) -> Result<()>
Emit task started event.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ExternalIntegrationRegistry
impl !UnwindSafe for ExternalIntegrationRegistry
impl Freeze for ExternalIntegrationRegistry
impl Send for ExternalIntegrationRegistry
impl Sync for ExternalIntegrationRegistry
impl Unpin for ExternalIntegrationRegistry
impl UnsafeUnpin for ExternalIntegrationRegistry
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