Documentation
¶
Overview ¶
Package engine provides an embeddable engine variant.
Index ¶
- Variables
- func NewDefaultStepRegistry(logger log.Logger, deployerRegistry deployerRegistry.Registry, ...) (step.Registry, error)
- func StepWorkflowPaths(wf *workflow.Workflow) map[string]string
- func SubworkflowCache(wf *workflow.Workflow, rootDir string, converter workflow.YAMLConverter, ...) (loadfile.FileCache, error)
- func SupportedVersion(version string) (string, error)
- type Workflow
- type WorkflowEngine
Constants ¶
This section is empty.
Variables ¶
var DefaultDeployerRegistry = registry.New( deployer.Any(docker.NewFactory()), deployer.Any(kubernetes.NewFactory()), deployer.Any(podman.NewFactory()), deployer.Any(python.NewFactory()), )
DefaultDeployerRegistry contains the deployers.
var ErrNoWorkflowFile = fmt.Errorf("no workflow file provided in context")
ErrNoWorkflowFile signals that no workflow file was provided in the context.
Functions ¶
func NewDefaultStepRegistry ¶ added in v0.4.0
func NewDefaultStepRegistry(logger log.Logger, deployerRegistry deployerRegistry.Registry, config *config.Config) (step.Registry, error)
NewDefaultStepRegistry creates a registry with the default step types applied.
func StepWorkflowPaths ¶ added in v0.9.2
StepWorkflowPaths finds all the file paths to workflows referenced in a workflow's steps. The key for each found workflow file is the file path as it is written in this workflow.
func SubworkflowCache ¶ added in v0.9.2
func SubworkflowCache(wf *workflow.Workflow, rootDir string, converter workflow.YAMLConverter, flowCaches []loadfile.FileCache) (loadfile.FileCache, error)
SubworkflowCache creates a file cache of the sub-workflows referenced in this workflow using rootDir as a context.
func SupportedVersion ¶ added in v0.8.0
SupportedVersion confirms whether a given version string is in the set of supported workflow specifications. It returns true when the version is in the set, false otherwise. Earlier schema validation already applies version's regular expression.
Types ¶
type Workflow ¶ added in v0.4.0
type Workflow interface { // Run executes the workflow with the passed, YAML-formatted input data. Run( ctx context.Context, input []byte, ) ( outputID string, outputData any, outputIsError bool, err error, ) // InputSchema returns the requested input schema for the workflow. InputSchema() schema.Scope // Outputs returns the list of possible outputs and their schema for the workflow. Outputs() map[string]schema.StepOutput Namespaces() map[string]map[string]*schema.ObjectSchema }
Workflow is a runnable, queryable workflow. You can execute it, or query it for schema information.
type WorkflowEngine ¶
type WorkflowEngine interface { // RunWorkflow is a simplified shortcut to parse and immediately run a workflow. RunWorkflow( ctx context.Context, input []byte, workflowContext loadfile.FileCache, workflowFileName string, ) (outputID string, outputData any, outputError bool, err error) // Parse ingests a workflow context as a map of files to their contents and a workflow file name and // parses the data into an executable workflow. Parse( workflowContext loadfile.FileCache, workflowFileName string, ) ( workflow Workflow, err error, ) }
WorkflowEngine is responsible for executing workflows and returning their result.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
arcaflow
Package main provides the main entrypoint for Arcaflow.
|
Package main provides the main entrypoint for Arcaflow. |
run-plugin
Package main provides a simple script to run a plugin as a standalone.
|
Package main provides a simple script to run a plugin as a standalone. |
Package config provides the Engine configuration structure.
|
Package config provides the Engine configuration structure. |
internal
|
|
builtinfunctions
Package builtinfunctions provides functions available to expressions in workflows.
|
Package builtinfunctions provides functions available to expressions in workflows. |
infer
Package infer provides the ability to construct a schema inferred from existing data and possibly expressions.
|
Package infer provides the ability to construct a schema inferred from existing data and possibly expressions. |
step
Package step provides the abstract definition of an Arcaflow workflow step.
|
Package step provides the abstract definition of an Arcaflow workflow step. |
step/dummy
Package dummy is a step provider that just says hello.
|
Package dummy is a step provider that just says hello. |
step/foreach
Package foreach provides the ability to loop over items.
|
Package foreach provides the ability to loop over items. |
step/plugin
Package plugin provides a step provider that executes container-based Arcaflow plugins using deployers.
|
Package plugin provides a step provider that executes container-based Arcaflow plugins using deployers. |
step/registry
Package registry provides the step registry, joining the step providers together.
|
Package registry provides the step registry, joining the step providers together. |
tablefmt
Package tablefmt provides functions to create tabular data where
|
Package tablefmt provides functions to create tabular data where |
tableprinter
Package tableprinter provides behavior to write tabular data to a given destination.
|
Package tableprinter provides behavior to write tabular data to a given destination. |
util
Package util provides a few minor tools.
|
Package util provides a few minor tools. |
Package loadfile provides functions to load files from a directory.
|
Package loadfile provides functions to load files from a directory. |
Package workflow provides the workflow execution engine.
|
Package workflow provides the workflow execution engine. |