Versions in this module Expand all Collapse all v1 v1.0.4 Dec 8, 2025 Changes in this version + func SaveWorkflow(db *gorm.DB, w *Workflow) error + type Context struct + Data map[string]interface{} + NodeID string + Workflow *Workflow + type DAG struct + func NewDAG() *DAG + func (dag *DAG) AddEdge(from string, to string) error + func (dag *DAG) AddVertex(id string, node interface{}) error + func (dag *DAG) TopologicalSort() [][]string + type Node struct + Action func(ctx Context) error + DependsOn []string + ID string + RetryPolicy int + type State string + const StateCompleted + const StateFailed + const StatePending + const StateRunning + type Workflow struct + ID string + Nodes map[string]Node + State State + Success map[string]bool + func LoadWorkflow(db *gorm.DB, id string) (*Workflow, error) + func (w *Workflow) Resume() error + func (w *Workflow) Run() error