Documentation
¶
Overview ¶
This package defines the intermediate layer that the compiler builds and transformers accept.
Index ¶
- Constants
- type AdjacencyList
- type Empty
- type Identifier
- type IdentifierSet
- func (s IdentifierSet) Delete(items ...Identifier)
- func (s IdentifierSet) Has(item Identifier) bool
- func (s IdentifierSet) HasAll(items ...Identifier) bool
- func (s IdentifierSet) HasAny(items ...Identifier) bool
- func (s IdentifierSet) Insert(items ...Identifier)
- func (s IdentifierSet) List() []Identifier
- type InterfaceProvider
- type LaunchPlanID
- type Node
- type NodeBuilder
- type NodeID
- type NodeIndex
- type StringAdjacencyList
- type Task
- type TaskID
- type TaskIDKey
- type TaskIndex
- type Workflow
- type WorkflowBuilder
- type WorkflowID
- type WorkflowIDKey
- type WorkflowIndex
Constants ¶
const ( StartNodeID = "start-node" EndNodeID = "end-node" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjacencyList ¶
type AdjacencyList map[string]IdentifierSet
Defines a string adjacency list.
func (AdjacencyList) ToMapOfLists ¶
func (l AdjacencyList) ToMapOfLists() map[string][]Identifier
Converts the sets in the adjacency list to sorted arrays.
type Identifier ¶
type Identifier = core.Identifier
type IdentifierSet ¶
type IdentifierSet map[string]Identifier
func NewIdentifierSet ¶
func NewIdentifierSet(items ...Identifier) IdentifierSet
NewString creates a String from a list of values.
func (IdentifierSet) Delete ¶
func (s IdentifierSet) Delete(items ...Identifier)
Delete removes all items from the set.
func (IdentifierSet) Has ¶
func (s IdentifierSet) Has(item Identifier) bool
Has returns true if and only if item is contained in the set.
func (IdentifierSet) HasAll ¶
func (s IdentifierSet) HasAll(items ...Identifier) bool
HasAll returns true if and only if all items are contained in the set.
func (IdentifierSet) HasAny ¶
func (s IdentifierSet) HasAny(items ...Identifier) bool
HasAny returns true if any items are contained in the set.
func (IdentifierSet) Insert ¶
func (s IdentifierSet) Insert(items ...Identifier)
Insert adds items to the set.
func (IdentifierSet) List ¶
func (s IdentifierSet) List() []Identifier
List returns the contents as a sorted Identifier slice.
type InterfaceProvider ¶
type InterfaceProvider interface {
GetID() *core.Identifier
GetExpectedInputs() *core.ParameterMap
GetExpectedOutputs() *core.VariableMap
}
type LaunchPlanID ¶
type LaunchPlanID = Identifier
type Node ¶
type Node interface {
GetId() NodeID
GetInterface() *core.TypedInterface
GetInputs() []*core.Binding
GetWorkflowNode() *core.WorkflowNode
GetOutputAliases() []*core.Alias
GetUpstreamNodeIds() []string
GetCoreNode() *core.Node
GetBranchNode() *core.BranchNode
GetTaskNode() *core.TaskNode
GetMetadata() *core.NodeMetadata
GetTask() Task
GetSubWorkflow() Workflow
}
An immutable Node that represents the final output of the compiler.
type NodeBuilder ¶
type NodeBuilder interface {
Node
SetInterface(iface *core.TypedInterface)
SetInputs(inputs []*core.Binding)
SetSubWorkflow(wf Workflow)
SetTask(task Task)
}
A mutable node used during the build of the intermediate layer.
type NodeIndex ¶
type NodeIndex map[NodeID]NodeBuilder
Defines an index of nodebuilders based on the id.
type StringAdjacencyList ¶
type Task ¶
type Task interface {
GetID() TaskID
GetCoreTask() *core.TaskTemplate
GetInterface() *core.TypedInterface
}
An immutable task that represents the final output of the compiler.
type TaskID ¶
type TaskID = Identifier
type Workflow ¶
type Workflow interface {
GetNode(id NodeID) (node NodeBuilder, found bool)
GetTask(id TaskID) (task Task, found bool)
GetLaunchPlan(id LaunchPlanID) (wf InterfaceProvider, found bool)
GetSubWorkflow(id WorkflowID) (wf *core.CompiledWorkflow, found bool)
GetCoreWorkflow() *core.CompiledWorkflow
GetFailureNode() Node
GetNodes() NodeIndex
GetTasks() TaskIndex
GetDownstreamNodes() StringAdjacencyList
GetUpstreamNodes() StringAdjacencyList
}
An immutable workflow that represents the final output of the compiler.
type WorkflowBuilder ¶
type WorkflowBuilder interface {
Workflow
AddExecutionEdge(nodeFrom, nodeTo NodeID)
AddNode(n NodeBuilder, errs errors.CompileErrors) (node NodeBuilder, ok bool)
ValidateWorkflow(fg *core.CompiledWorkflow, errs errors.CompileErrors) (Workflow, bool)
NewNodeBuilder(n *core.Node) NodeBuilder
}
A mutable workflow used during the build of the intermediate layer.
type WorkflowID ¶
type WorkflowID = Identifier
type WorkflowIDKey ¶
type WorkflowIDKey = string
type WorkflowIndex ¶
type WorkflowIndex map[WorkflowIDKey]*core.CompiledWorkflow
func NewWorkflowIndex ¶
func NewWorkflowIndex(workflows []*core.CompiledWorkflow, errs errors.CompileErrors) (index WorkflowIndex, ok bool)