common

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MB = 1024 * 1024 // 1 MB in bytes (1 MiB)
)

Variables

This section is empty.

Functions

func CheckOffloadingCompat added in v1.13.2

func CheckOffloadingCompat(ctx context.Context, nCtx interfaces.NodeExecutionContext, inputLiterals map[string]*core.Literal, node v1alpha1.ExecutableNode, literalOffloadingConfig config.LiteralOffloadingConfig) *handler.PhaseInfo

CheckOffloadingCompat checks if the upstream and downstream nodes are compatible with the literal offloading feature and returns an error if not contained in phase info object

func CreateParentInfo

func CreateParentInfo(grandParentInfo executors.ImmutableParentInfo, nodeID string, parentAttempt uint32, nodeIsDynamic bool) (executors.ImmutableParentInfo, error)

CreateParentInfo creates a unique parent id, the unique id of parent is dependent on the unique id and the current attempt of the grandparent to track the lineage.

func GenerateUniqueID

func GenerateUniqueID(parentInfo executors.ImmutableParentInfo, nodeID string) (string, error)

GenerateUniqueID is the UniqueId of a node is unique within a given workflow execution. In order to achieve that we track the lineage of the node. To compute the uniqueID of a node, we use the uniqueID and retry attempt of the parent node For nodes in level 0, there is no parent, and parentInfo is nil

func GetTargetEntity added in v1.13.0

func GetTargetEntity(ctx context.Context, nCtx interfaces.NodeExecutionContext) *core.Identifier

func OffloadLargeLiteral added in v1.13.2

func OffloadLargeLiteral(ctx context.Context, datastore *storage.DataStore, dataReference storage.DataReference,
	toBeOffloaded *idlcore.Literal, literalOffloadingConfig config.LiteralOffloadingConfig) error

OffloadLargeLiteral offloads the large literal if meets the threshold conditions

func ReadLargeLiteral added in v1.13.2

func ReadLargeLiteral(ctx context.Context, datastore *storage.DataStore,
	tobeRead *idlcore.Literal) error

ReadLargeLiteral reads the offloaded large literal needed by array node task

Types

This section is empty.

Jump to

Keyboard shortcuts

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