depgraph

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Root *GraphNode
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(name, version string) Graph

NewGraph creates new dependency graph with specified root

func (*Graph) AddChild

func (g *Graph) AddChild(parent *GraphNode, name, version string, child *artifact.Dependency) *GraphNode

AddChild adds relation between components. If node is nil, dependency added as direct one

func (*Graph) FlatDeps

func (g *Graph) FlatDeps() []artifact.Dependency

FlatDeps return flat slice with all dependencies (excluding the root)

func (*Graph) NewNode

func (g *Graph) NewNode(name, version string, asset *artifact.Dependency) *GraphNode

NewNode creates a new node for the dependency

func (*Graph) Node

func (g *Graph) Node(name, version string) *GraphNode

Node returns existing node or creates a new empty one

type GraphNode

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

need a wrapper around dependency to allow adding links to asset before asset is processed

Jump to

Keyboard shortcuts

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