executor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 14 Imported by: 4

Documentation

Overview

Package executor contains types and functions to help with the execution of the operands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionStrategy

type ExecutionStrategy int

ExecutionStrategy is the operands execution strategy of an operator.

const (
	Parallel ExecutionStrategy = iota
	Serial
)

type Executor

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

Executor is an operand executor. It is used to configure how the operands are executed. The event recorder is used to broadcast an event right after executing an operand.

func NewExecutor

NewExecutor initializes and returns an Executor.

func (*Executor) ExecuteOperands

func (exe *Executor) ExecuteOperands(
	order operand.OperandOrder,
	call operand.OperandRunCall,
	ctx context.Context,
	obj client.Object,
	ownerRef metav1.OwnerReference,
) (result ctrl.Result, rerr error)

ExecuteOperands executes operands in a given OperandOrder by calling a given OperandRunCall function on each of the operands. The OperandRunCall can be a call to Ensure or Delete.

Jump to

Keyboard shortcuts

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