Expand description
§FlowBuilder - Async Flow Orchestration Framework
FlowBuilder is a modular async flow orchestration framework with conditional execution and context sharing.
§Features
core
(default): Core flow building functionalitymacros
: Procedural macros for easier flow definitionlogger
: Tracing and logging supportruntime
: Advanced runtime featuresfull
: All features enabled
§Quick Start
use flowbuilder::prelude::*;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let flow = FlowBuilder::new()
.step(|ctx| async move {
println!("Step 1 executed");
Ok(())
})
.step(|ctx| async move {
println!("Step 2 executed");
Ok(())
})
.build();
flow.execute().await?;
Ok(())
}
Re-exports§
pub use flowbuilder_context as context;
pub use flowbuilder_runtime as runtime;
runtime
pub use flowbuilder_yaml as yaml;
yaml
Modules§
- prelude
- Prelude module for easy imports
Structs§
- Action
Spec - 动作规格
- Execution
Node - 执行节点 - 最小的执行单元
- Execution
Phase - 执行阶段 - 可以串行或并行执行的任务组
- Execution
Plan - 执行计划 - 编排器生成的执行顺序
- Flow
- Represents a flow that can be executed
- Flow
Builder - Builder for creating flows with a fluent API
- Flow
Executor - Executes flow steps
- Plan
Metadata - 计划元数据
- Retry
Config - 重试配置
- Timeout
Config - 超时配置
Enums§
- Executor
Status - 执行器状态
- Node
Type - 节点类型
- Phase
Execution Mode - 阶段执行模式
- Retry
Strategy - 重试策略
Traits§
- Config
Parser - 配置解析器接口
- Executor
- 执行器接口 - 所有执行器都必须实现这个接口
- Expression
Evaluator - 表达式评估器接口
- Flow
Planner - 流程编排器接口
Type Aliases§
- Step
- Step
Future - Type alias for step functions