pub struct WebhookManager { /* private fields */ }Expand description
Webhook delivery manager
Implementations§
Source§impl WebhookManager
impl WebhookManager
Sourcepub fn new(config: WebhookManagerConfig) -> Self
pub fn new(config: WebhookManagerConfig) -> Self
Create a new webhook manager
Sourcepub async fn register_endpoint(&self, endpoint: WebhookEndpoint) -> String
pub async fn register_endpoint(&self, endpoint: WebhookEndpoint) -> String
Register a webhook endpoint
Sourcepub async fn unregister_endpoint(&self, endpoint_id: &str) -> bool
pub async fn unregister_endpoint(&self, endpoint_id: &str) -> bool
Unregister a webhook endpoint
Sourcepub async fn get_endpoint(&self, endpoint_id: &str) -> Option<WebhookEndpoint>
pub async fn get_endpoint(&self, endpoint_id: &str) -> Option<WebhookEndpoint>
Get endpoint by ID
Sourcepub async fn list_endpoints(&self) -> Vec<WebhookEndpoint>
pub async fn list_endpoints(&self) -> Vec<WebhookEndpoint>
List all endpoints
Sourcepub async fn add_filter(&self, filter: EventFilter)
pub async fn add_filter(&self, filter: EventFilter)
Add an event filter
Sourcepub async fn emit(&self, event: WebhookEvent) -> Vec<DeliveryResult>
pub async fn emit(&self, event: WebhookEvent) -> Vec<DeliveryResult>
Emit an event to all matching endpoints
Sourcepub async fn get_dead_letters(&self) -> Vec<DeadLetterEntry>
pub async fn get_dead_letters(&self) -> Vec<DeadLetterEntry>
Get dead letter queue entries
Sourcepub async fn retry_dead_letter(&self, event_id: &str) -> Option<DeliveryResult>
pub async fn retry_dead_letter(&self, event_id: &str) -> Option<DeliveryResult>
Retry a dead letter entry
Sourcepub async fn clear_dead_letters(&self)
pub async fn clear_dead_letters(&self)
Clear dead letter queue
Sourcepub async fn get_statistics(&self) -> WebhookStatistics
pub async fn get_statistics(&self) -> WebhookStatistics
Get statistics
Sourcepub async fn test_endpoint(&self, endpoint_id: &str) -> Option<DeliveryResult>
pub async fn test_endpoint(&self, endpoint_id: &str) -> Option<DeliveryResult>
Test endpoint connectivity
Auto Trait Implementations§
impl !RefUnwindSafe for WebhookManager
impl !UnwindSafe for WebhookManager
impl Freeze for WebhookManager
impl Send for WebhookManager
impl Sync for WebhookManager
impl Unpin for WebhookManager
impl UnsafeUnpin for WebhookManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more