transform

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToNode

func ToNode(n *exec.Node) *runtime.Node

ToNode converts a persistence Node back to a runtime Node

func ToNodeWithStep

func ToNodeWithStep(n *exec.Node, step core.Step) *runtime.Node

ToNodeWithStep converts a persistence Node back to a runtime Node using the supplied step definition.

Types

type StatusBuilder

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

StatusBuilder creates Status objects for a specific DAG

func NewStatusBuilder

func NewStatusBuilder(dag *core.DAG) *StatusBuilder

NewStatusBuilder creates a new StatusFactory for the specified DAG

func (*StatusBuilder) Create

func (f *StatusBuilder) Create(
	dagRunID string,
	status core.Status,
	pid int,
	startedAt time.Time,
	opts ...StatusOption,
) exec.DAGRunStatus

Create builds a Status object for a dag-run with the specified parameters

type StatusOption

type StatusOption func(*exec.DAGRunStatus)

StatusOption is a functional option pattern for configuring Status objects

func WithArchiveDir

func WithArchiveDir(archiveDir string) StatusOption

WithArchiveDir returns a StatusOption that sets the artifact/archive directory path.

func WithAttemptID

func WithAttemptID(attemptID string) StatusOption

WithAttemptID returns a StatusOption that sets the attempt ID

func WithAttemptKey

func WithAttemptKey(attemptKey string) StatusOption

WithAttemptKey returns a StatusOption that sets the attempt key

func WithAutoRetryCount

func WithAutoRetryCount(autoRetryCount int) StatusOption

WithAutoRetryCount returns a StatusOption that sets the DAG-run auto-retry count.

func WithConditions

func WithConditions(conditions []exec.DAGRunCondition) StatusOption

WithConditions returns a StatusOption that sets observed runtime conditions.

func WithCreatedAt

func WithCreatedAt(t int64) StatusOption

WithCreatedAt returns a StatusOption that sets the created time

func WithError

func WithError(err string) StatusOption

WithError returns a StatusOption that sets the top-level error message

func WithFinishedAt

func WithFinishedAt(t time.Time) StatusOption

WithFinishedAt returns a StatusOption that sets the finished time

func WithHierarchyRefs

func WithHierarchyRefs(root exec.DAGRunRef, parent exec.DAGRunRef) StatusOption

WithHierarchyRefs returns a StatusOption that sets the root DAG information

func WithLogFilePath

func WithLogFilePath(logFilePath string) StatusOption

WithLogFilePath returns a StatusOption that sets the log file path

func WithNodes

func WithNodes(nodes []runtime.NodeData) StatusOption

WithNodes returns a StatusOption that sets the node data for the status

func WithOnAbortNode

func WithOnAbortNode(node *runtime.Node) StatusOption

WithOnAbortNode returns a StatusOption that sets the abort handler node

func WithOnExitNode

func WithOnExitNode(node *runtime.Node) StatusOption

WithOnExitNode returns a StatusOption that sets the exit handler node

func WithOnFailureNode

func WithOnFailureNode(node *runtime.Node) StatusOption

WithOnFailureNode returns a StatusOption that sets the failure handler node

func WithOnInitNode

func WithOnInitNode(node *runtime.Node) StatusOption

WithOnInitNode returns a StatusOption that sets the init handler node

func WithOnSuccessNode

func WithOnSuccessNode(node *runtime.Node) StatusOption

WithOnSuccessNode returns a StatusOption that sets the success handler node

func WithOnWaitNode

func WithOnWaitNode(node *runtime.Node) StatusOption

WithOnWaitNode returns a StatusOption that sets the wait handler node

func WithPIDStartedAt

func WithPIDStartedAt(startedAt int64) StatusOption

WithPIDStartedAt returns a StatusOption that sets the OS process start time.

func WithPendingStepRetries

func WithPendingStepRetries(retries []exec.PendingStepRetry) StatusOption

WithPendingStepRetries returns a StatusOption that sets any parent-managed step retries that are waiting to be scheduled.

func WithPreconditions

func WithPreconditions(conditions []*core.Condition) StatusOption

WithPreconditions returns a StatusOption that sets the preconditions

func WithQueuedAt

func WithQueuedAt(formattedTime string) StatusOption

WithQueuedAt returns a StatusOption that sets the queued time

func WithRuntimeProfile

func WithRuntimeProfile(name, resolvedAt string, entries []exec.RuntimeProfileEntry) StatusOption

WithRuntimeProfile returns a StatusOption that records selected profile metadata.

func WithScheduleTime

func WithScheduleTime(formattedTime string) StatusOption

WithScheduleTime returns a StatusOption that sets the schedule time

func WithTriggerActor

func WithTriggerActor(actor string) StatusOption

WithTriggerActor returns a StatusOption that sets the attributable trigger actor.

func WithTriggerType

func WithTriggerType(triggerType core.TriggerType) StatusOption

WithTriggerType returns a StatusOption that sets the trigger type

func WithWorkerID

func WithWorkerID(workerID string) StatusOption

WithWorkerID returns a StatusOption that sets the worker ID

func WithWorkingDir

func WithWorkingDir(workingDir string) StatusOption

WithWorkingDir returns a StatusOption that sets the effective dag-run working directory path.

Jump to

Keyboard shortcuts

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