topology

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	Run(ctx context.Context, kIn, vIn interface{}) (kOut, vOut interface{}, cont bool, err error)
	Type() Type
	Childs() []Node
	AddChild(node Node)
}

type NodeBuilder

type NodeBuilder interface {
	Build() (Node, error)
	Type() Type
	ChildBuilders() []NodeBuilder
	AddChildBuilder(builder NodeBuilder)
}

type Sink

type Sink interface {
	Node
	Name() string
	Close() error
}

type SinkBuilder

type SinkBuilder interface {
	NodeBuilder
	Name() string
	ID() int32
	Info() map[string]string
	SinkType() string
}

type Source

type Source interface {
	Run(ctx context.Context, kIn, vIn []byte) (kOut, vOut interface{}, err error)
	Name() string
	Close()
}

type SourceBuilder

type SourceBuilder interface {
	Name() string
	Info() map[string]string
	SourceType() string
	Build() (Source, error)
}

type Topology

type Topology struct {
	Source     Source
	SourceNode Node
}

func (Topology) Run

func (t Topology) Run(ctx context.Context, kIn, vIn []byte) (kOut, vOut interface{}, err error)

type TopologyBuilder

type TopologyBuilder struct {
	Source            SourceBuilder
	SourceNodeBuilder NodeBuilder
}

func (TopologyBuilder) Build

func (tb TopologyBuilder) Build() (Topology, error)

type Type

type Type string
const TypeBranch Type = `branch`
const TypeJoiner Type = `joiner`
const TypeMaterialize Type = `materializer`
const TypeSink Type = `sink`
const TypeSource Type = `source`
const TypeThrough Type = `through`

Jump to

Keyboard shortcuts

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