graphbuilder

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphBuilder

type GraphBuilder interface {
	// Context carries values across API boundaries.
	context.Context
	// Logger represents the ability to log messages.
	logr.Logger
	// Run runs the GraphBuilder.
	Run(<-chan struct{})
}

GraphBuilder analyzes directed acyclic graph defined in operation set.

func NewGraphBuilder

func NewGraphBuilder(
	ctx context.Context,
	logger logr.Logger,
	cli client.Client,
	eventRecorder record.EventRecorder,
	scheme *runtime.Scheme,
	cache cache.Cache,
	graphBuilderCh chan diagnosisv1.OperationSet,
) GraphBuilder

NewGraphBuilder creates a new graph builder.

type NodeQueue

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

NodeQueue implements a FIFO queue.

func (*NodeQueue) Dequeue

func (q *NodeQueue) Dequeue() graph.Node

Dequeue returns the graph.Node at the front of the queue and removes it from the queue.

func (*NodeQueue) Enqueue

func (q *NodeQueue) Enqueue(n graph.Node)

Enqueue adds the node n to the back of the queue.

func (*NodeQueue) Len

func (q *NodeQueue) Len() int

Len returns the number of graph.Nodes in the queue.

func (*NodeQueue) Reset

func (q *NodeQueue) Reset()

Reset clears the queue for reuse.

type NodeStack

type NodeStack []graph.Node

NodeStack implements a LIFO stack of graph.Node.

func (*NodeStack) Len

func (s *NodeStack) Len() int

Len returns the number of graph.Nodes on the stack.

func (*NodeStack) Pop

func (s *NodeStack) Pop() graph.Node

Pop returns the last graph.Node on the stack and removes it from the stack.

func (*NodeStack) Push

func (s *NodeStack) Push(n graph.Node)

Push adds the node n to the stack at the last position.

Jump to

Keyboard shortcuts

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