Documentation ¶
Overview ¶
Dag provides a way to describe a directed acyclic graph of work to be done. It starts with a root node, then you add nodes to it. Outputs are automatically connected to subsequent inputs.
Index ¶
- type ExecutionInfo
- type IOSpec
- type Node
- func (n *Node[T]) AddChild(node *Node[T])
- func (n *Node[T]) Children() []*Node[T]
- func (n *Node[T]) Complete() bool
- func (n *Node[T]) Execute(ctx context.Context)
- func (n *Node[T]) Inputs() []T
- func (n *Node[T]) Meta() NodeMetadata
- func (n *Node[T]) Outputs() []T
- func (n *Node[T]) Parents() []*Node[T]
- func (n *Node[T]) Started() bool
- func (n *Node[T]) Status() NodeStatus
- type NodeMetadata
- type NodeStatus
- type Work
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionInfo ¶
type IOSpec ¶
type IOSpec interface { NodeID() string ID() string CID() string Path() string IsRoot() bool SetExecutionInfo(ExecutionInfo) ExecutionInfo() ExecutionInfo }
type Node ¶
type Node[T any] struct {
// contains filtered or unexported fields
}
Node is a node in a directed acyclic graph. It has edges via links to child nodes.
func (*Node[T]) Status ¶
func (n *Node[T]) Status() NodeStatus
type NodeMetadata ¶
NodeMetadata contains metadata about a node
type NodeStatus ¶
type Work ¶
type Work[T any] func(ctx context.Context, inputs []T, statusChan chan NodeStatus) []T
Work is shorthand for a function that accepts inputs and returns outputs.
Click to show internal directories.
Click to hide internal directories.