node

package
v0.0.0-...-02c6b06 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUniqueName

func GetUniqueName(td *testdefinition.TestDefinition, step *tmv1beta1.DAGStep, flow string) string

Types

type Node

type Node struct {
	Parents  *Set
	Children *Set

	TestDefinition *testdefinition.TestDefinition
	Template       *argov1.Template
	// contains filtered or unexported fields
}

Node is an object that represents a node of the internal DAG representation

func NewEmpty

func NewEmpty(name string) *Node

NewEmpty creates and new empty node with a name.

func NewNode

func NewNode(td *testdefinition.TestDefinition, step *tmv1beta1.DAGStep, flow string) *Node

NewNode creates a new TestflowNode for the internal DAG

func (*Node) AddChildren

func (n *Node) AddChildren(children ...*Node) *Node

AddChildren adds Nodes as children

func (*Node) AddParents

func (n *Node) AddParents(parents ...*Node)

AddParents adds nodes as parents.

func (*Node) ClearChildren

func (n *Node) ClearChildren() *Node

ClearChildren removes all children from the current node

func (*Node) ClearParents

func (n *Node) ClearParents() *Node

ClearParents removes all parents from the current node

func (*Node) EnableOutput

func (n *Node) EnableOutput()

EnableOutput adds std output to the test and marks the node as node with output.

func (*Node) GetInputSource

func (n *Node) GetInputSource() *Node

GetInputSource returns the input source node.

func (*Node) GetOrDetermineArtifacts

func (n *Node) GetOrDetermineArtifacts(trustedTokenMounts, untrustedTokenMounts []ProjectedTokenMount) []argov1.Artifact

func (*Node) HasOutput

func (n *Node) HasOutput() bool

HasOutput indicates if the node has output

func (*Node) IsSerial

func (n *Node) IsSerial() bool

IsSerial returns true if the node is serial.

func (*Node) Name

func (n *Node) Name() string

Name returns the unique name of the node's task

func (*Node) ParentNames

func (n *Node) ParentNames() []string

ParentNames returns the names of all parent nodes

func (*Node) RemoveChild

func (n *Node) RemoveChild(child *Node) *Node

RemoveChild removes a node from the current node's children

func (*Node) RemoveChildren

func (n *Node) RemoveChildren(children ...*Node) *Node

RemoveChildren removes all nodes from the current node's children

func (*Node) RemoveParent

func (n *Node) RemoveParent(parent *Node) *Node

ClearParent removes a node from the current node's parents

func (*Node) SetInputSource

func (n *Node) SetInputSource(node *Node)

SetInputSource sets the input source node for artifacts that are mounted to the test.

func (*Node) SetSerial

func (n *Node) SetSerial()

SetSerial adds global std output to the test and marks the node as serial.

func (*Node) SetStep

func (n *Node) SetStep(step *tmv1beta1.DAGStep)

SetStep set the step of a node

func (*Node) Status

func (n *Node) Status() *tmv1beta1.StepStatus

Status returns the status for the test step based in the node.

func (*Node) Step

func (n *Node) Step() *tmv1beta1.DAGStep

Step returns the origin step of the node

func (*Node) Task

func (n *Node) Task(phase testmachinery.Phase, trustedTokenMounts, untrustedTokenMounts []ProjectedTokenMount) []argov1.DAGTask

Task returns the argo task definition for the node.

type ProjectedTokenMount

type ProjectedTokenMount struct {
	Audience          string
	ExpirationSeconds int64
	Name              string
	MountPath         string
}

ProjectedTokenMount transports information how a projected service account token should be mounted

type Set

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

func CreateNodesFromStep

func CreateNodesFromStep(step *tmv1beta1.DAGStep, loc locations.Locations, globalConfig []*config.Element, flowID string) (*Set, error)

CreateNodesFromStep creates new nodes from a step and adds default configuration

func NewSet

func NewSet(nodes ...*Node) *Set

NewSet creates a new set of nodes

func (*Set) Add

func (s *Set) Add(nodes ...*Node) *Set

Add adds nodes to the set

func (*Set) AddChildren

func (s *Set) AddChildren(children ...*Node) *Set

AddChildren adds nodes as children.

func (*Set) AddParents

func (s *Set) AddParents(parents ...*Node) *Set

AddParents adds nodes as parents.

func (*Set) ClearChildren

func (s *Set) ClearChildren() *Set

ClearChildren removes all children.

func (*Set) ClearParents

func (s *Set) ClearParents() *Set

Clear Parents removes all parents.

func (*Set) Copy

func (s *Set) Copy() *Set

New creates a deep copy of the set

func (*Set) GetChildren

func (s *Set) GetChildren() *Set

GetChildren returns a set of all children

func (*Set) GetParents

func (s *Set) GetParents() *Set

GetParents returns a set of all parents

func (*Set) Has

func (s *Set) Has(n *Node) bool

Has returns true if the given node is in the list

func (*Set) Iterate

func (s *Set) Iterate() chan *Node

func (*Set) IterateInverse

func (s *Set) IterateInverse() chan *Node

func (*Set) Last

func (s *Set) Last() *Node

Last returns the last node of the list

func (*Set) Len

func (s *Set) Len() int

Len returns the length of the list

func (Set) List

func (s Set) List() []*Node

List return all nodes of the set as an array

func (*Set) Remove

func (s *Set) Remove(nodes ...*Node) *Set

Removes nodes form the set

func (*Set) RemoveChildren

func (s *Set) RemoveChildren(children ...*Node)

RemoveChildren removes nodes from children

func (*Set) RemoveParents

func (s *Set) RemoveParents(parents ...*Node) *Set

RemoveParents removes nodes from parents.

func (Set) Set

func (s Set) Set() map[*Node]sets.Empty

Set returns map of the set

Jump to

Keyboard shortcuts

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