Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph dependency graph for local charts in a source directory
func (*Graph) GetDependents ¶
Return the names of the dependents for the given chart
func (*Graph) TopoSort ¶
TopoSort will sort the given charts in topological order. Eg. suppose we have A <- B <- C (C depends on B, which depends on A) D <- E G H <- I <- J
TopoSort([]string{"C", "H", "E", "I", "B", "D"}) will sort to []{"D", "B", "H", "I", "C", "E"} (or another valid topological ordering)
This sort is not stable.
func (*Graph) WithTransitiveDependents ¶
Given a set of chart names, return the charts along with names of all transitive local dependents Eg. suppose we have A <- B <- C D <- E G H <- I <- J WithTransitiveDependents([]string{"A", "G", "I"}) will return []string{"A", "G", "B", "C", "I", "J"} (order not guaranteed)