dependency

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2017 License: Apache-2.0 Imports: 3 Imported by: 1

README

Dependency

CircleCI

Original implementation is Situart Sierra's Dependency for Clojure Component. This is golang version of Dependency implementation.

Dependency create a directed acyclic graph (DAG) data structure. The DAG is used to identify dependencies among components.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type By

type By func(x, y string) bool

func (By) Sort

func (by By) Sort(dep DependencyList)

type Dependency

type Dependency map[string]DependencyMap

type DependencyList

type DependencyList []string

func (*DependencyList) Pos

func (l *DependencyList) Pos(s string) int

type DependencyMap

type DependencyMap map[string]struct{}

func Transitive

func Transitive(neighbors *Dependency, node string) DependencyMap

type MapDependencyGraph

type MapDependencyGraph struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph() *MapDependencyGraph

func (*MapDependencyGraph) Copy

func (*MapDependencyGraph) Depend

func (g *MapDependencyGraph) Depend(node, dep string) error

func (*MapDependencyGraph) ImmediateDependencies

func (g *MapDependencyGraph) ImmediateDependencies(node string) DependencyMap

func (*MapDependencyGraph) ImmediateDependents

func (g *MapDependencyGraph) ImmediateDependents(node string) DependencyMap

func (*MapDependencyGraph) IsDepend

func (g *MapDependencyGraph) IsDepend(node, dep string) bool

func (*MapDependencyGraph) Nodes

func (g *MapDependencyGraph) Nodes() DependencyMap

func (*MapDependencyGraph) RemoveEdge

func (g *MapDependencyGraph) RemoveEdge(node, dep string) *MapDependencyGraph

func (*MapDependencyGraph) RemoveNode

func (g *MapDependencyGraph) RemoveNode(node string) *MapDependencyGraph

func (*MapDependencyGraph) Sort

func (g *MapDependencyGraph) Sort(dep DependencyList)

func (*MapDependencyGraph) TopoSort

func (g *MapDependencyGraph) TopoSort() DependencyList

func (*MapDependencyGraph) TransitiveDependencies

func (g *MapDependencyGraph) TransitiveDependencies(node string) DependencyMap

func (*MapDependencyGraph) TransitiveDependents

func (g *MapDependencyGraph) TransitiveDependents(node string) DependencyMap

type TopoSorter

type TopoSorter struct {
	// contains filtered or unexported fields
}

func (TopoSorter) Len

func (t TopoSorter) Len() int

func (TopoSorter) Less

func (t TopoSorter) Less(i, j int) bool

func (TopoSorter) Swap

func (t TopoSorter) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL