execution

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDeadlinePolicy

func ApplyDeadlinePolicy(
	ctx context.Context,
	policy core.DeadlinePolicy,
) (admissionCtx context.Context, postAdmissionDeadline time.Time)

ApplyDeadlinePolicy decides how deadlines behave around admission.

func ReapplyDeadline

func ReapplyDeadline(
	ctx context.Context,
	deadline time.Time,
) (context.Context, context.CancelFunc)

ReapplyDeadline reapplies deadline after admission.

Types

type Executor

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

Executor is the ONLY component allowed to run user code.

func NewExecutor

func NewExecutor(
	admission *admission.Controller,
	shutdown core.ShutdownCoordinator,
) *Executor

func (*Executor) Execute

func (e *Executor) Execute(
	exec core.Execution,
	fn func(context.Context) error,
) Result

type Result

type Result struct {
	Err          error
	Kind         ierrors.Kind
	CancelSource core.CancellationSource
	Completed    bool
}

Result represents the final execution outcome.

func BuildResult

func BuildResult(ctx context.Context, execErr error) Result

BuildResult normalizes execution outcome.

Jump to

Keyboard shortcuts

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