Versions in this module Expand all Collapse all v1 v1.0.6 Nov 4, 2024 Changes in this version + var ErrWorkingDirNotExist = fmt.Errorf("working directory does not exist") + type Config struct + Delay time.Duration + Dry bool + LogDir string + Logger logger.Logger + MaxActiveRuns int + OnCancel *dag.Step + OnExit *dag.Step + OnFailure *dag.Step + OnSuccess *dag.Step + ReqID string + Timeout time.Duration + type ExecutionGraph struct + func NewExecutionGraph(lg logger.Logger, steps ...dag.Step) (*ExecutionGraph, error) + func NewExecutionGraphForRetry(lg logger.Logger, nodes ...*Node) (*ExecutionGraph, error) + func (g *ExecutionGraph) Duration() time.Duration + func (g *ExecutionGraph) Finish() + func (g *ExecutionGraph) FinishAt() time.Time + func (g *ExecutionGraph) IsFinished() bool + func (g *ExecutionGraph) IsRunning() bool + func (g *ExecutionGraph) IsStarted() bool + func (g *ExecutionGraph) NodeData() []NodeData + func (g *ExecutionGraph) Nodes() []*Node + func (g *ExecutionGraph) Start() + func (g *ExecutionGraph) StartAt() time.Time + type Node struct + func NewNode(step dag.Step, state NodeState) *Node + func (n *Node) Data() NodeData + func (n *Node) Execute(ctx context.Context) error + func (n *Node) SetError(err error) + func (n *Node) State() NodeState + type NodeData struct + State NodeState + Step dag.Step + type NodeState struct + DoneCount int + Error error + FinishedAt time.Time + Log string + RetriedAt time.Time + RetryCount int + StartedAt time.Time + Status NodeStatus + type NodeStatus int + const NodeStatusCancel + const NodeStatusError + const NodeStatusNone + const NodeStatusRunning + const NodeStatusSkipped + const NodeStatusSuccess + func (s NodeStatus) String() string + type Scheduler struct + func New(cfg *Config) *Scheduler + func (sc *Scheduler) Cancel(g *ExecutionGraph) + func (sc *Scheduler) HandlerNode(name dag.HandlerType) *Node + func (sc *Scheduler) Schedule(ctx context.Context, g *ExecutionGraph, done chan *Node) error + func (sc *Scheduler) Signal(g *ExecutionGraph, sig os.Signal, done chan bool, allowOverride bool) + func (sc *Scheduler) Status(g *ExecutionGraph) Status + type Status int + const StatusCancel + const StatusError + const StatusNone + const StatusRunning + const StatusSuccess + func (s Status) String() string