Documentation
¶
Overview ¶
Package dag represents abstract directed acyclic graph.
Index ¶
- func GatherMatchingInputNames(node Node, condition NodeCondition) []string
- func Walk(graph Graph, walkFn WalkFunc, visited map[Node]struct{}, depth int) error
- func WalkNode(node Node, walkFn WalkFunc, visited map[Node]struct{}, depth int) error
- type BaseGraph
- type BaseNode
- type Graph
- type Node
- type NodeCondition
- type WalkFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GatherMatchingInputNames ¶
func GatherMatchingInputNames(node Node, condition NodeCondition) []string
GatherMatchingInputNames scans all the inputs and returns those which match the condition.
Types ¶
type BaseGraph ¶
type BaseGraph struct {
// contains filtered or unexported fields
}
BaseGraph implements core functionality of DAG.
BaseGraph is designed to be embedded into other types.
type BaseNode ¶
type BaseNode struct {
// contains filtered or unexported fields
}
BaseNode implements core functionality of the node.
BaseNode is designed to be included into other types.
func NewBaseNode ¶
NewBaseNode creates new embeddable BaseNode.
type Graph ¶
type Graph interface {
Targets() []Node
}
Graph represents the targets of the build process.
type Node ¶
Node in directed acyclic graph, recording parent nodes as inputs.
func FindByName ¶
FindByName walks the nodes to find the node with matching name.
func GatherMatchingInputs ¶
func GatherMatchingInputs(node Node, condition NodeCondition) []Node
GatherMatchingInputs scans all the inputs and returns those which match the condition.
func GatherMatchingInputsRecursive ¶
func GatherMatchingInputsRecursive(node Node, condition NodeCondition) []Node
GatherMatchingInputsRecursive scans all the inputs recursively and returns those which match the condition.
type NodeCondition ¶
NodeCondition checks the node for a specific condition.
func Implements ¶
func Implements[T any]() NodeCondition
Implements checks whether node implements specific type T.