pipeline

package
v0.9.14 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config []Params

Config is the configuration of a pipeline.

func (Config) BuildPipeline

func (c Config) BuildPipeline(context operator.BuildContext, defaultOutput operator.Operator) (*Pipeline, error)

BuildPipeline will build a pipeline from the config.

type OperatorNode

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

OperatorNode is a basic node that represents an operator in a pipeline.

func (OperatorNode) DOTID

func (b OperatorNode) DOTID() string

DOTID returns the id used to represent this node in a dot graph.

func (OperatorNode) ID

func (b OperatorNode) ID() int64

ID returns the node id.

func (OperatorNode) Operator

func (b OperatorNode) Operator() operator.Operator

Operator returns the operator of the node.

func (OperatorNode) OutputIDs

func (b OperatorNode) OutputIDs() map[string]int64

OutputIDs returns a map of output operator ids to node ids.

type Params

type Params map[string]interface{}

Params is a raw params map that can be converted into an operator config.

func (Params) BuildConfigs

func (p Params) BuildConfigs(pluginRegistry operator.PluginRegistry, namespace string, defaultOutput []string) ([]operator.Config, error)

BuildConfigs will build operator configs from a params map.

func (Params) ID

func (p Params) ID() string

ID returns the id field in the params map.

func (Params) NamespaceExclusions

func (p Params) NamespaceExclusions(namespace string) []string

NamespaceExclusions will return all ids to exclude from namespacing.

func (Params) NamespacedID

func (p Params) NamespacedID(namespace string) string

NamespacedID will return the id field with a namespace.

func (Params) NamespacedOutputs

func (p Params) NamespacedOutputs(namespace string) []string

NamespacedOutputs will return the output field with a namespace.

func (Params) Outputs

func (p Params) Outputs() []string

Outputs returns the output field in the params map.

func (Params) TemplateInput

func (p Params) TemplateInput(namespace string) string

TemplateInput will return the template input.

func (Params) TemplateOutput

func (p Params) TemplateOutput(namespace string, defaultOutput []string) string

TemplateOutput will return the template output.

func (Params) Type

func (p Params) Type() string

Type returns the type field in the params map.

func (*Params) UnmarshalYAML

func (p *Params) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML will unmarshal yaml bytes into Params

func (Params) Validate

func (p Params) Validate() error

Validate will validate the basic fields required to make an operator config.

type Pipeline

type Pipeline struct {
	Graph *simple.DirectedGraph
	// contains filtered or unexported fields
}

Pipeline is a directed graph of connected operators.

func NewPipeline

func NewPipeline(operators []operator.Operator) (*Pipeline, error)

NewPipeline creates a new pipeline of connected operators.

func (*Pipeline) MarshalDot

func (p *Pipeline) MarshalDot() ([]byte, error)

MarshalDot will encode the pipeline as a dot graph.

func (*Pipeline) Start

func (p *Pipeline) Start() error

Start will start the operators in a pipeline in reverse topological order.

func (*Pipeline) Stop

func (p *Pipeline) Stop()

Stop will stop the operators in a pipeline in topological order.

Jump to

Keyboard shortcuts

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