Skip to main content

PushSender

Trait PushSender 

Source
pub trait PushSender:
    Send
    + Sync
    + 'static {
    // Required method
    fn send<'a>(
        &'a self,
        url: &'a str,
        event: &'a StreamResponse,
        config: &'a TaskPushNotificationConfig,
    ) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'a>>;
}
Expand description

Trait for delivering push notifications to client webhooks.

Object-safe; used as Box<dyn PushSender>.

Required Methods§

Source

fn send<'a>( &'a self, url: &'a str, event: &'a StreamResponse, config: &'a TaskPushNotificationConfig, ) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'a>>

Sends a streaming event to the client’s webhook URL.

§Errors

Returns an A2aError if delivery fails after all retries.

Implementors§