dag

package
v0.0.0-...-5a0513b Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	// contains filtered or unexported methods
}

type EventNewDep

type EventNewDep[T any] struct {
	Node *Node[T]
}

type Hook

type Hook func(Event)

type Node

type Node[T any] struct {
	V  T
	ID string

	Dependencies *nodesTransitive[T]
	Dependees    *nodesTransitive[T]
	// contains filtered or unexported fields
}

func NewNode

func NewNode[T any](id string, v T) *Node[T]

func (*Node[T]) AddDependency

func (d *Node[T]) AddDependency(deps ...*Node[T])

func (*Node[T]) AddHook

func (d *Node[T]) AddHook(hook Hook)

func (*Node[T]) DebugString

func (d *Node[T]) DebugString() string

func (*Node[T]) Freeze

func (d *Node[T]) Freeze(valid func(*Node[T]) bool) bool

Freeze will lock, and run valid across all dependencies, return false to prevent locking

func (*Node[T]) GetID

func (d *Node[T]) GetID() string

func (*Node[T]) IsFrozen

func (d *Node[T]) IsFrozen() bool

func (*Node[T]) RemoveDependency

func (d *Node[T]) RemoveDependency(dep *Node[T])

Jump to

Keyboard shortcuts

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