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
}
func ComputeDependencyGraph ¶
func ComputeDependencyGraph(items []DependencyItem) (DependencyGraph, error)
ComputeDependencyGraph creates a DependencyGraph from a slice of DependencyItems, validating that all dependencies exist
in the graph and returning an error if any are missing.
func (DependencyGraph) Lookup ¶
func (dg DependencyGraph) Lookup(key string) (DependencySet, bool)
Lookup returns the DependencySet associated with the given key if it exists, and a boolean indicating whether the key was found.
func (DependencyGraph) Order ¶
func (dg DependencyGraph) Order() ([]DependencyItem, error)
Order orders the DependencyItems in the DependencyGraph in a topological order and returns them in a slice, or returns an error if a cycle is detected.
type DependencyItem ¶
type DependencySet ¶
type DependencySet interface { Key() string Item() DependencyItem GetDirectDependencies() []DependencySet GetTransitiveDependencies() []DependencySet }
Click to show internal directories.
Click to hide internal directories.