Documentation
¶
Index ¶
- func CommandResolution(ctx context.Context, s ir.Step) cmnvalue.CommandContext
- func IsExecutorRegistered(executorType string) bool
- func RegisterExecutorCapabilities(executorType string, caps ExecutorCapabilities)
- func RegisterExecutorConfigSchema(executorType string, schema *jsonschema.Schema)
- func RegisterStepValidator(executorType string, validator StepValidator)
- func ScriptResolution(ctx context.Context, s ir.Step) cmnvalue.CommandContext
- func UnregisterExecutorCapabilities(executorType string)
- func UnregisterStepValidator(executorType string)
- func ValidateExecutorConfig(executorType string, config map[string]any) error
- func ValidateStep(step ir.Step) error
- type ExecutorCapabilities
- type StepValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandResolution ¶
CommandResolution returns command execution facts for command field resolution.
func IsExecutorRegistered ¶
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 ¶
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 ¶
ValidateExecutorConfig validates config against the registered schema. Returns nil if no schema is registered (backward compatible).
func ValidateStep ¶
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 ¶
StepValidator validates an executor's step configuration.