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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! Pipeline operators for declarative event flows
//!
//! Each operator implements the `PipelineOperator` trait and processes a
//! `FlowContext` during pipeline execution. Operators are compiled from
//! YAML `PipelineStep` configurations.
//!
//! # Operator types
//!
//! **Synchronous (1:1)** — preserve cardinality:
//! - `resolve` — Resolve an entity by ID or by following a link
//! - `filter` — Drop events that don't match a condition
//! - `map` — Transform the payload via a Tera template
//! - `deliver` — Send to one or more sinks
//!
//! **Stateful (1:N or N:1)** — change cardinality:
//! - `fan_out` — Multiply event for each linked entity (see T2.3)
//! - `batch` — Accumulate events and flush on window expiry (see T2.3)
//! - `deduplicate` — Remove duplicates within a window (see T2.3)
//! - `rate_limit` — Throttle via token bucket (see T2.3)
pub use BatchOp;
pub use DeduplicateOp;
pub use DeliverOp;
pub use FanOutOp;
pub use FilterOp;
pub use MapOp;
pub use RateLimitOp;
pub use ResolveOp;
use crateFlowContext;
use Result;
use async_trait;
/// Result of executing a pipeline operator
/// Trait for pipeline operators
///
/// Each operator receives a mutable `FlowContext` and returns an `OpResult`
/// indicating whether to continue, drop, or fan out.
///
/// # Implementors
///
/// - `ResolveOp` — resolves entities via LinkService/EntityFetcher
/// - `FilterOp` — evaluates boolean conditions
/// - `MapOp` — transforms payload via Tera templates
/// - `DeliverOp` — delivers to sinks