registry

package
v2.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandResolution

func CommandResolution(ctx context.Context, s ir.Step) cmnvalue.CommandContext

CommandResolution returns command execution facts for command field resolution.

func IsExecutorRegistered

func IsExecutorRegistered(executorType string) bool

IsExecutorRegistered reports whether an executor type has registered metadata.

func RegisterExecutorCapabilities

func RegisterExecutorCapabilities(executorType string, caps ExecutorCapabilities)

RegisterExecutorCapabilities registers capabilities for an executor type.

func RegisterExecutorConfigSchema

func RegisterExecutorConfigSchema(executorType string, schema *jsonschema.Schema)

RegisterExecutorConfigSchema registers a JSON schema for an executor config. The schema is used to validate executor config at DAG parse time.

func RegisterStepValidator

func RegisterStepValidator(executorType string, validator StepValidator)

RegisterStepValidator registers a validator for an executor type.

func ScriptResolution

func ScriptResolution(ctx context.Context, s ir.Step) cmnvalue.CommandContext

ScriptResolution returns command execution facts for script field resolution.

func UnregisterExecutorCapabilities

func UnregisterExecutorCapabilities(executorType string)

UnregisterExecutorCapabilities removes capabilities for an executor type.

func UnregisterStepValidator

func UnregisterStepValidator(executorType string)

UnregisterStepValidator removes the validator for an executor type.

func ValidateExecutorConfig

func ValidateExecutorConfig(executorType string, config map[string]any) error

ValidateExecutorConfig validates config against the registered schema. Returns nil if no schema is registered (backward compatible).

func ValidateStep

func ValidateStep(step ir.Step) error

ValidateStep runs the registered validator, if any.

Types

type ExecutorCapabilities

type ExecutorCapabilities struct {
	// Command indicates whether the executor supports the command field.
	Command bool
	// MultipleCommands indicates whether the executor supports multiple commands.
	MultipleCommands bool
	// Script indicates whether the executor supports the script field.
	Script bool
	// Shell indicates whether the executor uses shell/shellArgs/shellPackages.
	Shell bool
	// Container indicates whether the executor supports step-level container config.
	Container bool
	// SubDAG indicates whether the executor can execute sub-DAGs.
	SubDAG bool
	// WorkerSelector indicates whether the executor supports worker selection.
	WorkerSelector bool
	// LLM indicates whether the executor supports the llm field.
	LLM bool
	// CommandContext returns command execution facts for command field resolution.
	CommandContext func(ctx context.Context, step ir.Step) cmnvalue.CommandContext
	// ScriptContext returns command execution facts for script field resolution.
	ScriptContext func(ctx context.Context, step ir.Step) cmnvalue.CommandContext
}

ExecutorCapabilities defines what an executor can do.

func ExecutorCapabilitiesFor

func ExecutorCapabilitiesFor(executorType string) ExecutorCapabilities

ExecutorCapabilitiesFor returns the registered capabilities for an executor type.

type StepValidator

type StepValidator func(step ir.Step) error

StepValidator validates an executor's step configuration.

Jump to

Keyboard shortcuts

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