Documentation
¶
Overview ¶
Package graph implements Kahn's topological sort over a unified dependency graph that spans services, docker containers, compose services, and cluster resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
Name string
Kind ResourceKind
}
Node is a vertex in the dependency graph.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver builds and resolves a unified dependency graph.
func New ¶
New builds a Resolver from a parsed config. Returns an error if any depends_on reference names a resource that doesn't exist.
func (*Resolver) StartOrder ¶
StartOrder returns nodes in topological order (dependencies first). Returns an error if the graph contains a cycle.
type ResourceKind ¶
type ResourceKind int
ResourceKind identifies what kind of resource a node represents.
const ( KindService ResourceKind = iota KindDocker KindCompose KindClusterImage KindClusterDeploy )
func (ResourceKind) String ¶
func (k ResourceKind) String() string
Click to show internal directories.
Click to hide internal directories.