executors

package
v1.1.129 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDFromObject added in v0.15.0

func IDFromObject(obj client.Object, op string) []byte

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 ClientBuilder added in v1.1.26

type ClientBuilder interface {
	// WithUncached takes a list of runtime objects (plain or lists) that users don't want to cache
	// for this client. This function can be called multiple times, it should append to an internal slice.
	WithUncached(objs ...client.Object) ClientBuilder

	// Build returns a new client.
	Build(cache cache.Cache, config *rest.Config, options client.Options) (client.Client, error)
}

ClientBuilder builder is the interface for the client builder.

type ControlFlow added in v0.7.5

type ControlFlow interface {
	CurrentParallelism() uint32
	IncrementParallelism() uint32
}

func InitializeControlFlow added in v0.7.5

func InitializeControlFlow() ControlFlow

type DAGStructure added in v0.7.0

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 added in v0.7.0

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 added in v0.7.0

type DAGStructureWithStartNode interface {
	DAGStructure
	// The Starting node for the DAG
	StartNode() v1alpha1.ExecutableNode
}

type ExecutionContext added in v0.7.0

func NewExecutionContext added in v0.7.0

func NewExecutionContext(immExecContext ImmutableExecutionContext, tasksGetter TaskDetailsGetter, workflowGetter SubWorkflowGetter, parentInfo ImmutableParentInfo, flow ControlFlow) ExecutionContext

func NewExecutionContextWithParentInfo added in v0.7.0

func NewExecutionContextWithParentInfo(prevExecContext ExecutionContext, parentInfo ImmutableParentInfo) ExecutionContext

func NewExecutionContextWithTasksGetter added in v0.7.0

func NewExecutionContextWithTasksGetter(prevExecContext ExecutionContext, taskGetter TaskDetailsGetter) ExecutionContext

func NewExecutionContextWithWorkflowGetter added in v0.7.0

func NewExecutionContextWithWorkflowGetter(prevExecContext ExecutionContext, getter SubWorkflowGetter) ExecutionContext

type FallbackClientBuilder added in v0.7.0

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

func NewFallbackClientBuilder added in v0.7.0

func NewFallbackClientBuilder(scope promutils.Scope) *FallbackClientBuilder

NewFallbackClientBuilder Creates a new k8s client that uses the cached client for reads and falls back to making API calls if it failed. Write calls will always go to raw client directly.

func (FallbackClientBuilder) Build added in v0.7.0

func (f FallbackClientBuilder) Build(cache cache.Cache, config *rest.Config, options client.Options) (client.Client, error)

func (*FallbackClientBuilder) WithUncached added in v0.7.0

func (f *FallbackClientBuilder) WithUncached(objs ...client.Object) ClientBuilder

type ImmutableExecutionContext added in v0.7.0

type ImmutableExecutionContext interface {
	v1alpha1.Meta
	GetID() v1alpha1.WorkflowID
	GetOnFailurePolicy() v1alpha1.WorkflowOnFailurePolicy
	GetExecutionConfig() v1alpha1.ExecutionConfig
}

type ImmutableParentInfo added in v0.7.0

type ImmutableParentInfo interface {
	GetUniqueID() v1alpha1.NodeID
	CurrentAttempt() uint32
}

func NewParentInfo added in v0.7.0

func NewParentInfo(uniqueID string, currentAttempts uint32) ImmutableParentInfo

type NodeLookup added in v0.7.0

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 NewNodeLookup added in v0.7.0

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 added in v0.7.0

Returns a new NodeLookup useful in Testing. Not recommended to be used in production

type ParentInfoGetter added in v0.7.0

type ParentInfoGetter interface {
	GetParentInfo() ImmutableParentInfo
}

type SubWorkflowGetter added in v0.7.0

type SubWorkflowGetter interface {
	FindSubWorkflow(subID v1alpha1.WorkflowID) v1alpha1.ExecutableSubWorkflow
}

type TaskDetailsGetter added in v0.7.0

type TaskDetailsGetter interface {
	GetTask(id v1alpha1.TaskID) (v1alpha1.ExecutableTask, error)
}

type Workflow

type Workflow interface {
	Initialize(ctx context.Context) error
	HandleFlyteWorkflow(ctx context.Context, w *v1alpha1.FlyteWorkflow) error
	HandleAbortedWorkflow(ctx context.Context, w *v1alpha1.FlyteWorkflow, maxRetries uint32) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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