dep_tree

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepTree

type DepTree[T any] struct {
	// Info present on DepTree construction.
	Ids []string
	NodeParser[T]
	// Info present just after node processing.
	Graph       *graph.Graph[T]
	Entrypoints []*graph.Node[T]
	Cycles      *orderedmap.OrderedMap[[2]string, graph.Cycle]
	// contains filtered or unexported fields
}

func NewDepTree

func NewDepTree[T any](parser NodeParser[T], ids []string) *DepTree[T]

func (*DepTree[T]) LoadCycles added in v0.17.4

func (dt *DepTree[T]) LoadCycles()

func (*DepTree[T]) LoadGraph added in v0.17.4

func (dt *DepTree[T]) LoadGraph() error

func (*DepTree[T]) WithStdErrLoader added in v0.19.0

func (dt *DepTree[T]) WithStdErrLoader() *DepTree[T]

type DisplayResult added in v0.19.2

type DisplayResult struct {
	Name  string
	Group string
}

type NodeParser

type NodeParser[T any] interface {
	Display(node *graph.Node[T]) DisplayResult
	Node(id string) (*graph.Node[T], error)
	Deps(node *graph.Node[T]) ([]*graph.Node[T], error)
}

type NodeParserBuilder added in v0.13.5

type NodeParserBuilder[T any] func([]string) (NodeParser[T], error)

type TestParser

type TestParser struct {
	Spec [][]int
}

func (*TestParser) Deps

func (t *TestParser) Deps(n *graph.Node[[]int]) ([]*graph.Node[[]int], error)

func (*TestParser) Display

func (t *TestParser) Display(n *graph.Node[[]int]) DisplayResult

func (*TestParser) Node added in v0.19.0

func (t *TestParser) Node(id string) (*graph.Node[[]int], error)

Jump to

Keyboard shortcuts

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