pub struct WebhookIntegration { /* private fields */ }Expand description
Webhook integration for processing events
Implementations§
Source§impl WebhookIntegration
impl WebhookIntegration
pub async fn new( config: WebhookConfig, app_manager: Arc<dyn AppManager + Send + Sync>, queue_manager: Option<Arc<QueueManager>>, ) -> Result<Self>
pub fn is_enabled(&self) -> bool
pub async fn send_channel_occupied( &self, app: &App, channel: &str, ) -> Result<()>
pub async fn send_channel_vacated(&self, app: &App, channel: &str) -> Result<()>
pub async fn send_member_added( &self, app: &App, channel: &str, user_id: &str, ) -> Result<()>
pub async fn send_member_removed( &self, app: &App, channel: &str, user_id: &str, ) -> Result<()>
pub async fn send_client_event( &self, app: &App, channel: &str, event_name: &str, event_data: Value, socket_id: Option<&str>, user_id: Option<&str>, ) -> Result<()>
pub async fn send_cache_missed(&self, app: &App, channel: &str) -> Result<()>
Sourcepub async fn send_subscription_count_changed(
&self,
app: &App,
channel: &str,
subscription_count: usize,
) -> Result<()>
pub async fn send_subscription_count_changed( &self, app: &App, channel: &str, subscription_count: usize, ) -> Result<()>
Sends a webhook when the subscription count for a channel changes.
Sourcepub async fn check_queue_health(&self) -> Result<()>
pub async fn check_queue_health(&self) -> Result<()>
Check the health of the queue manager used by webhook integration
Auto Trait Implementations§
impl Freeze for WebhookIntegration
impl !RefUnwindSafe for WebhookIntegration
impl Send for WebhookIntegration
impl Sync for WebhookIntegration
impl Unpin for WebhookIntegration
impl UnsafeUnpin for WebhookIntegration
impl !UnwindSafe for WebhookIntegration
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