Documentation
¶
Overview ¶
Package faninmap derives the fan-out -> fan-in convergence map of a workflow graph. It is an engine-side optimization view computed from a graph's public definition, not part of the graph itself: workflow.Graph carries only the author's definition (nodes, transitions, fan-in flags), and the engine builds this lookup from it when it needs to route an empty fan-out cohort to its convergence node.
The map is a pure, deterministic function of the graph structure, so it is never persisted - the engine computes it once per flow at dispatch (caching it beside the parsed graph) rather than freezing it into the stored graph JSON. The traversal assumes an already-validated graph (workflow.Graph.Validate rejects the malformed shapes this analysis would otherwise have to guard against), so it only builds the mapping.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is the fan-out -> fan-in convergence lookup for one graph.
func New ¶
New computes the fan-in map of a validated graph by walking its lineage: each branch of a fan-out pushes a frame identifying its source, and reaching a fan-in node pops the nearest frame and records that source -> fan-in mapping. Mirrors the lineage bookkeeping workflow.Graph.Validate performs to check convergence, but keeps only the resulting map.