deps

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircularDependencyError

type CircularDependencyError struct {
	Dependent  *Node
	Dependency *Node
}

func (CircularDependencyError) Error

func (e CircularDependencyError) Error() string

type MapNodeSet

type MapNodeSet map[*Node]struct{}

MapNodeSet is a Node set backed by a Go map (unordered). NOTE: DO *NOT* USE this for on-chain operations, but OrderedNodeSet

func (MapNodeSet) Add

func (m MapNodeSet) Add(node *Node)

func (MapNodeSet) Contains

func (m MapNodeSet) Contains(node *Node) bool

func (MapNodeSet) ForEach

func (m MapNodeSet) ForEach(f func(*Node) error) error

func (MapNodeSet) Remove

func (m MapNodeSet) Remove(node *Node)

type Node

type Node struct {
	Value interface{}
	// contains filtered or unexported fields
}

func NewNode

func NewNode(value interface{}, newNodeSet func() NodeSet) *Node

func (*Node) AllDependents

func (n *Node) AllDependents() ([]*Node, error)

func (*Node) SetDependencies

func (n *Node) SetDependencies(dependencies ...*Node)

type NodeSet

type NodeSet interface {
	Add(*Node)
	Remove(*Node)
	Contains(*Node) bool
	ForEach(func(*Node) error) error
}

NodeSet is a set of Node

func NewMapNodeSet

func NewMapNodeSet() NodeSet

type OrderedNodeSet

type OrderedNodeSet orderedmap.OrderedMap[*Node, struct{}]

OrderedNodeSet is a Node set backed by an ordered map

func (*OrderedNodeSet) Add

func (os *OrderedNodeSet) Add(node *Node)

func (*OrderedNodeSet) Contains

func (os *OrderedNodeSet) Contains(node *Node) bool

func (*OrderedNodeSet) ForEach

func (os *OrderedNodeSet) ForEach(f func(*Node) error) error

func (*OrderedNodeSet) Remove

func (os *OrderedNodeSet) Remove(node *Node)

Jump to

Keyboard shortcuts

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