Documentation
¶
Overview ¶
Package exec schedules markers over the follow-edge dependency DAG: topological order, stable-sorted ready set, cycle detection, capped parallelism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
Result is the outcome of a task. Exactly one of Err being set, Skipped being true, or a clean success holds. Skipped means the task never ran because its dependency failed, was missing, or formed a cycle.
func Execute ¶
Execute runs tasks honouring their from-edges: a task runs only after the task it follows has succeeded. Independent tasks run first, up to workers at a time; followers run in later waves. A task whose dependency fails, is unknown, or lies on a cycle is skipped rather than aborting the run, so one bad marker never sinks the rest. Results are returned in input order.
type Task ¶
type Task struct {
ID string
From string
Label string
FromLabel string
Run func(ctx context.Context) error
}
Task is a node in the follow-edge dependency graph: an optional ID others may follow, the ID it follows (From, empty when independent), and the work to run. Run is provider-agnostic - the pipeline supplies a closure that resolves a producer or a follower - so the scheduler stays a pure graph executor.
ID and From may be opaque, namespaced keys; Label and FromLabel are their human-readable forms used in skip reasons so an internal key never reaches the user. Each defaults to its key when unset.