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
//! Generic table-driven pipeline execution framework.
//!
//! This module provides a reusable pipeline infrastructure that supports:
//! - Table-driven execution plans based on state
//! - Parallel and sequential task execution modes
//! - Arbitrary number of stages and tasks
//!
//! ## Architecture
//!
//! ```text
//! Pipeline → Stages → Tasks
//!
//! - Pipeline: Orchestrates execution of all stages
//! - Stage: Groups related tasks with an execution mode (parallel/sequential)
//! - Task: Atomic unit of work
//! ```
//!
//! ## Example
//!
//! ```ignore
//! use pipeline::{ExecutionPlan, PipelineBuilder, PipelineExecutor, Stage};
//! use std::sync::Arc;
//! use tokio::sync::Mutex;
//!
//! struct Context;
//! struct TaskA;
//! struct TaskB;
//!
//! let plan = ExecutionPlan::new(vec![Stage::parallel(vec![
//! Box::new(TaskA),
//! Box::new(TaskB),
//! ])]);
//!
//! let ctx = Arc::new(Mutex::new(Context));
//! let pipeline = PipelineBuilder::from_plan(plan);
//! let metrics = PipelineExecutor::execute(pipeline, ctx).await?;
//! println!("pipeline took {}ms", metrics.total_duration_ms);
//! ```
pub use ;
pub use ;
pub use ;
pub use ;