pipeline

package
v0.90.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefaultOutput operator.Operator
	Operators     []operator.Config
}

Config is the configuration of a pipeline.

func (Config) Build

func (c Config) Build(logger *zap.SugaredLogger) (*DirectedPipeline, error)

Build will build a pipeline from the config.

type DirectedPipeline

type DirectedPipeline struct {
	Graph *simple.DirectedGraph
	*zap.SugaredLogger
	// contains filtered or unexported fields
}

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(persister operator.Persister) 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(persister operator.Persister) 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