Documentation ¶
Index ¶
- Variables
- func BuildNewClientFunc(scope promutils.Scope) func(config *rest.Config, options client.Options) (client.Client, error)
- type Client
- type ControlFlow
- type DAGStructure
- type DAGStructureWithStartNode
- type ExecutionContext
- func NewExecutionContext(immExecContext ImmutableExecutionContext, tasksGetter TaskDetailsGetter, ...) ExecutionContext
- func NewExecutionContextWithParentInfo(prevExecContext ExecutionContext, parentInfo ImmutableParentInfo) ExecutionContext
- func NewExecutionContextWithTasksGetter(prevExecContext ExecutionContext, taskGetter TaskDetailsGetter) ExecutionContext
- func NewExecutionContextWithWorkflowGetter(prevExecContext ExecutionContext, getter SubWorkflowGetter) ExecutionContext
- type FailureNodeLookup
- func (f FailureNodeLookup) FromNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error)
- func (f FailureNodeLookup) GetNode(nodeID v1alpha1.NodeID) (v1alpha1.ExecutableNode, bool)
- func (f FailureNodeLookup) GetNodeExecutionStatus(ctx context.Context, id v1alpha1.NodeID) v1alpha1.ExecutableNodeStatus
- func (f FailureNodeLookup) ToNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error)
- type ImmutableExecutionContext
- type ImmutableParentInfo
- type NodeLookup
- type ParentInfoGetter
- type SubWorkflowGetter
- type TaskDetailsGetter
- type Workflow
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Client ¶
type Client interface { // GetClient returns a client configured with the Config GetClient() client.Client // GetCache returns a cache.Cache GetCache() cache.Cache }
Client is a friendlier controller-runtime client that gets passed to executors
type ControlFlow ¶
type ControlFlow interface { CurrentParallelism() uint32 IncrementParallelism() uint32 CurrentNodeExecutionCount() uint32 IncrementNodeExecutionCount() uint32 CurrentTaskExecutionCount() uint32 IncrementTaskExecutionCount() uint32 }
func InitializeControlFlow ¶
func InitializeControlFlow() ControlFlow
type DAGStructure ¶
type DAGStructure interface { // Lookup for upstream edges, find all node ids from which this node can be reached. ToNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error) // Lookup for downstream edges, find all node ids that can be reached from the given node id. FromNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error) }
An interface that captures the Directed Acyclic Graph structure in which the nodes are connected. If NodeLookup and DAGStructure are used together a traversal can be implemented.
func NewLeafNodeDAGStructure ¶
func NewLeafNodeDAGStructure(leafNode v1alpha1.NodeID, parentNodes ...v1alpha1.NodeID) DAGStructure
Returns a new DAGStructure for a leafNode. i.e., there are only incoming edges and no outgoing edges. Also there is no StartNode for this Structure
type DAGStructureWithStartNode ¶
type DAGStructureWithStartNode interface { DAGStructure // The Starting node for the DAG StartNode() v1alpha1.ExecutableNode }
type ExecutionContext ¶
type ExecutionContext interface { ImmutableExecutionContext TaskDetailsGetter SubWorkflowGetter ParentInfoGetter ControlFlow }
func NewExecutionContext ¶
func NewExecutionContext(immExecContext ImmutableExecutionContext, tasksGetter TaskDetailsGetter, workflowGetter SubWorkflowGetter, parentInfo ImmutableParentInfo, flow ControlFlow) ExecutionContext
func NewExecutionContextWithParentInfo ¶
func NewExecutionContextWithParentInfo(prevExecContext ExecutionContext, parentInfo ImmutableParentInfo) ExecutionContext
func NewExecutionContextWithTasksGetter ¶
func NewExecutionContextWithTasksGetter(prevExecContext ExecutionContext, taskGetter TaskDetailsGetter) ExecutionContext
func NewExecutionContextWithWorkflowGetter ¶
func NewExecutionContextWithWorkflowGetter(prevExecContext ExecutionContext, getter SubWorkflowGetter) ExecutionContext
type FailureNodeLookup ¶ added in v1.10.7
type FailureNodeLookup struct { NodeLookup FailureNode v1alpha1.ExecutableNode FailureNodeStatus v1alpha1.ExecutableNodeStatus }
func (FailureNodeLookup) GetNode ¶ added in v1.10.7
func (f FailureNodeLookup) GetNode(nodeID v1alpha1.NodeID) (v1alpha1.ExecutableNode, bool)
func (FailureNodeLookup) GetNodeExecutionStatus ¶ added in v1.10.7
func (f FailureNodeLookup) GetNodeExecutionStatus(ctx context.Context, id v1alpha1.NodeID) v1alpha1.ExecutableNodeStatus
type ImmutableExecutionContext ¶
type ImmutableExecutionContext interface { v1alpha1.Meta GetID() v1alpha1.WorkflowID GetOnFailurePolicy() v1alpha1.WorkflowOnFailurePolicy GetExecutionConfig() v1alpha1.ExecutionConfig }
type ImmutableParentInfo ¶
func NewParentInfo ¶
func NewParentInfo(uniqueID string, currentAttempts uint32) ImmutableParentInfo
type NodeLookup ¶
type NodeLookup interface { GetNode(nodeID v1alpha1.NodeID) (v1alpha1.ExecutableNode, bool) GetNodeExecutionStatus(ctx context.Context, id v1alpha1.NodeID) v1alpha1.ExecutableNodeStatus // Lookup for upstream edges, find all node ids from which this node can be reached. ToNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error) // Lookup for downstream edges, find all node ids that can be reached from the given node id. FromNode(id v1alpha1.NodeID) ([]v1alpha1.NodeID, error) }
NodeLookup provides a structure that enables looking up all nodes within the current execution hierarchy/context. NOTE: execution hierarchy may change the nodes available, this is because when a SubWorkflow is being executed, only the nodes within the subworkflow are visible
func NewFailureNodeLookup ¶ added in v1.10.7
func NewFailureNodeLookup(nodeLookup NodeLookup, failureNode v1alpha1.ExecutableNode, failureNodeStatus v1alpha1.ExecutableNodeStatus) NodeLookup
func NewNodeLookup ¶
func NewNodeLookup(n v1alpha1.NodeGetter, s v1alpha1.NodeStatusGetter, d DAGStructure) NodeLookup
Returns a Contextual NodeLookup using the given NodeGetter and a separate NodeStatusGetter. Very useful in Subworkflows where the Subworkflow is the reservoir of the nodes, but the status for these nodes maybe stored int he Top-level workflow node itself.
func NewTestNodeLookup ¶
func NewTestNodeLookup(nodes map[v1alpha1.NodeID]v1alpha1.ExecutableNode, status map[v1alpha1.NodeID]v1alpha1.ExecutableNodeStatus) NodeLookup
Returns a new NodeLookup useful in Testing. Not recommended to be used in production
type ParentInfoGetter ¶
type ParentInfoGetter interface {
GetParentInfo() ImmutableParentInfo
}
type SubWorkflowGetter ¶
type SubWorkflowGetter interface {
FindSubWorkflow(subID v1alpha1.WorkflowID) v1alpha1.ExecutableSubWorkflow
}
type TaskDetailsGetter ¶
type TaskDetailsGetter interface {
GetTask(id v1alpha1.TaskID) (v1alpha1.ExecutableTask, error)
}