Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyGraph ¶
type DependencyGraph struct {
// contains filtered or unexported fields
}
DependencyGraph represents a dependency graph encoded within a resource snapshot.
func NewDependencyGraph ¶
func NewDependencyGraph(resources []*resource.State) *DependencyGraph
NewDependencyGraph creates a new DependencyGraph from a list of resources. The resources should be in topological order with respect to their dependencies.
func (*DependencyGraph) DependingOn ¶
func (dg *DependencyGraph) DependingOn(res *resource.State) []*resource.State
DependingOn returns a slice containing all resources that directly or indirectly depend upon the given resource. The returned slice is guaranteed to be in topological order with respect to the snapshot dependency graph.
The time complexity of DependingOn is linear with respect to the number of resources.
Click to show internal directories.
Click to hide internal directories.