Documentation
¶
Index ¶
- type DAG
- func (d *DAG) GetAllNodes() map[string]*DAGNode
- func (d *DAG) GetExecutionOrder() [][]string
- func (d *DAG) GetFailedNodes() []*DAGNode
- func (d *DAG) GetNode(nodeID string) (*DAGNode, bool)
- func (d *DAG) GetReadyNodes() []*DAGNode
- func (d *DAG) HasFailures() bool
- func (d *DAG) IsComplete() bool
- func (d *DAG) SetNodeStatus(nodeID string, status NodeStatus, err error)
- type DAGNode
- type NodeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAG ¶
type DAG struct {
// contains filtered or unexported fields
}
DAG represents a directed acyclic graph of resources
func NewDAG ¶
func NewDAG(instances []config.ResourceInstance) (*DAG, error)
NewDAG creates a new DAG from resource instances
func (*DAG) GetAllNodes ¶
GetAllNodes returns all nodes in the DAG
func (*DAG) GetExecutionOrder ¶
GetExecutionOrder returns the topological order for execution
func (*DAG) GetFailedNodes ¶
GetFailedNodes returns all nodes that have failed
func (*DAG) GetReadyNodes ¶
GetReadyNodes returns nodes that are ready to execute
func (*DAG) HasFailures ¶
HasFailures returns true if any node has failed
func (*DAG) IsComplete ¶
IsComplete returns true if all nodes have completed (successfully or with error)
func (*DAG) SetNodeStatus ¶
func (d *DAG) SetNodeStatus(nodeID string, status NodeStatus, err error)
SetNodeStatus updates the status of a node
type DAGNode ¶
type DAGNode struct {
ID string
Instance config.ResourceInstance
Dependencies []string
Dependents []string
Status NodeStatus
Error error
}
DAGNode represents a node in the dependency graph
type NodeStatus ¶
type NodeStatus string
NodeStatus represents the execution status of a node
const ( StatusPending NodeStatus = "pending" StatusReady NodeStatus = "ready" StatusRunning NodeStatus = "running" StatusCompleted NodeStatus = "completed" StatusFailed NodeStatus = "failed" )
Click to show internal directories.
Click to hide internal directories.