graph

package
v0.0.0-...-6eee6bf Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder helps building a graph and connect their nodes. It takes care of instantiating all its stages given a name and a type, as well as connect them. If two connected stages have incompatible types, it will insert a codec in between to translate between the stage types

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (nb *Builder) Build() Graph

func (*Builder) Connect

func (nb *Builder) Connect(src, dst stage.Name) error

func (*Builder) Instantiate

func (nb *Builder) Instantiate(n stage.Name, t stage.Type, args interface{}) error

TODO: verify that name is not duplicate

func (*Builder) RegisterCodec

func (nb *Builder) RegisterCodec(middleFunc node.MiddleFunc)

func (*Builder) RegisterExport

func (nb *Builder) RegisterExport(b stage.ExportProvider)

func (*Builder) RegisterIngest

func (nb *Builder) RegisterIngest(b stage.IngestProvider)

func (*Builder) RegisterTransform

func (nb *Builder) RegisterTransform(b stage.TransformProvider)

type Graph

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

func (*Graph) Run

func (g *Graph) Run()

Run all the stages of the graph and wait until all the nodes stopped processing.

Jump to

Keyboard shortcuts

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