pub struct HttpPushNotificationSender { /* private fields */ }Available on crate features
server and a2a-v1 only.Expand description
HTTP-based push notification sender with retry and SSRF validation.
Uses reqwest::Client to POST JSON payloads to webhook URLs. Retries
up to 3 times with exponential backoff (1s, 2s, 4s) on failure. Validates
webhook URLs to reject private IP ranges and localhost (SSRF prevention).
Implementations§
Source§impl HttpPushNotificationSender
impl HttpPushNotificationSender
Sourcepub fn new() -> HttpPushNotificationSender
pub fn new() -> HttpPushNotificationSender
Creates a new sender with a default reqwest::Client.
Sourcepub fn with_client(client: Client) -> HttpPushNotificationSender
pub fn with_client(client: Client) -> HttpPushNotificationSender
Creates a new sender with a custom reqwest::Client.
Trait Implementations§
Source§impl Default for HttpPushNotificationSender
impl Default for HttpPushNotificationSender
Source§fn default() -> HttpPushNotificationSender
fn default() -> HttpPushNotificationSender
Returns the “default value” for a type. Read more
Source§impl PushNotificationSender for HttpPushNotificationSender
impl PushNotificationSender for HttpPushNotificationSender
Source§fn send_status_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
event: &'life2 TaskStatusUpdateEvent,
config: &'life3 TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
HttpPushNotificationSender: 'async_trait,
fn send_status_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
event: &'life2 TaskStatusUpdateEvent,
config: &'life3 TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
HttpPushNotificationSender: 'async_trait,
Delivers a task status update to the configured webhook.
Source§fn send_artifact_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
event: &'life2 TaskArtifactUpdateEvent,
config: &'life3 TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
HttpPushNotificationSender: 'async_trait,
fn send_artifact_update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
event: &'life2 TaskArtifactUpdateEvent,
config: &'life3 TaskPushNotificationConfig,
) -> Pin<Box<dyn Future<Output = Result<(), A2aError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
HttpPushNotificationSender: 'async_trait,
Delivers a task artifact update to the configured webhook.
Auto Trait Implementations§
impl Freeze for HttpPushNotificationSender
impl !RefUnwindSafe for HttpPushNotificationSender
impl Send for HttpPushNotificationSender
impl Sync for HttpPushNotificationSender
impl Unpin for HttpPushNotificationSender
impl UnsafeUnpin for HttpPushNotificationSender
impl !UnwindSafe for HttpPushNotificationSender
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