1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! Event-driven notification system for the ironflow lifecycle.
//!
//! Uses a publisher/subscriber pattern: the [`EventPublisher`] broadcasts
//! [`Event`]s to registered [`EventSubscriber`]s. Event type filtering
//! is handled by the publisher at subscription time -- subscribers only
//! receive events they signed up for.
//!
//! Built-in subscribers:
//! - [`WebhookSubscriber`] -- POSTs JSON to a URL with retry and exponential backoff.
//! - [`BetterStackSubscriber`] -- forwards error events to BetterStack Logs.
//!
//! # Architecture
//!
//! - [`Event`] -- domain event enum covering runs, steps, approvals, auth.
//! - [`EventSubscriber`] -- trait: receives and handles a single event.
//! - [`EventPublisher`] -- holds subscriptions (subscriber + event type filter),
//! dispatches matching events via `tokio::spawn`.
//! - [`MessageFormatter`] -- trait: converts events into platform-specific messages.
//! - [`RetryConfig`] -- shared retry/backoff configuration for HTTP subscribers.
//! - [`WebhookSubscriber`] -- built-in HTTP POST implementation.
//!
//! # Examples
//!
//! ```no_run
//! use ironflow_engine::notify::{Event, EventPublisher, WebhookSubscriber};
//!
//! let mut publisher = EventPublisher::new();
//! publisher.subscribe(
//! WebhookSubscriber::new("https://hooks.example.com/events"),
//! &[Event::RUN_STATUS_CHANGED, Event::STEP_FAILED],
//! );
//! ```
pub use BetterStackSubscriber;
pub use Event;
pub use ;
pub use EventPublisher;
pub use ;
pub use ;
pub use WebhookSubscriber;