pipeline

package
v0.13.13-0...-98661b4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 8 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 []operator.Config

Config is the configuration of a pipeline.

func (Config) BuildOperators

func (c Config) BuildOperators(bc operator.BuildContext) ([]operator.Operator, error)

BuildOperators builds the operators from the list of configs into operators

func (Config) BuildPipeline

func (c Config) BuildPipeline(bc operator.BuildContext, defaultOperator operator.Operator) (*DirectedPipeline, error)

BuildPipeline will build a pipeline from the config.

type DirectedPipeline

type DirectedPipeline struct {
	Graph *simple.DirectedGraph
}

DirectedPipeline is a pipeline backed by a directed graph

func NewDirectedPipeline

func NewDirectedPipeline(operators []operator.Operator) (*DirectedPipeline, error)

NewDirectedPipeline creates a new directed pipeline

func (*DirectedPipeline) Operators

func (p *DirectedPipeline) Operators() []operator.Operator

Operators returns a slice of operators that make up the pipeline graph

func (*DirectedPipeline) Render

func (p *DirectedPipeline) Render() ([]byte, error)

Render will render the pipeline as a dot graph

func (*DirectedPipeline) Start

func (p *DirectedPipeline) Start() error

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

func (*DirectedPipeline) Stop

func (p *DirectedPipeline) Stop() error

Stop will stop the operators in a pipeline in topological order

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 Pipeline

type Pipeline interface {
	Start() error
	Stop() error
	Operators() []operator.Operator
	Render() ([]byte, error)
}

Pipeline is a collection of connected operators that exchange entries

Jump to

Keyboard shortcuts

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