Skip to main content

graph

Graph workflow engine supporting directed execution graphs with conditional routing, parallel branches, and configurable join strategies (all, any, N-of-M, vote). Each node can be a step, parallel block, or route.

Used by cmd/graph-worker, cmd/graph-run.

Usage

import "cruvero/internal/graph"

Key Types / Interfaces

TypeSourceDescription
Graphtypes.goSerializable directed graph definition with name and ordered nodes
Nodetypes.goUnion type: step, parallel, or route node
StepNodetypes.goActivity execution node with conditional execution and approval
ParallelNodetypes.goParallel branch execution with join strategy
RouteNodetypes.goConditional routing with cases and conditions
GraphRunInputtypes.goWorkflow input: run ID, graph, initial state, config
GraphRunResulttypes.goWorkflow output: final execution state
RunConfigtypes.goExecution config: step timeout, approval timeout, conditions
Statetypes.goType alias for map[string]any — mutable execution state
ConditionFunctypes.goPredicate function evaluated against execution state

Key Files

FilePurpose
types.goAll graph types: Graph, Node, State, input/output
workflow.goGraph workflow execution engine