topo

package
v2.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveSubTopo

func RemoveSubTopo(name string)

Types

type SrcSubTopo

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

SrcSubTopo Implements node.SourceNode

func GetSubTopo

func GetSubTopo(name string) (*SrcSubTopo, bool)

func (*SrcSubTopo) AddOperator

func (s *SrcSubTopo) AddOperator(inputs []node.Emitter, operator node.OperatorNode) *SrcSubTopo

AddOperator adds an internal operator to the subtopo.

func (*SrcSubTopo) AddOutput

func (s *SrcSubTopo) AddOutput(output chan<- interface{}, name string) error

func (*SrcSubTopo) AddSrc

func (s *SrcSubTopo) AddSrc(src node.DataSourceNode) *SrcSubTopo

func (*SrcSubTopo) Close

func (s *SrcSubTopo) Close(ctx api.StreamContext, ruleId string, runId int)

func (*SrcSubTopo) EnableCheckpoint

func (s *SrcSubTopo) EnableCheckpoint(sources *[]checkpoint.StreamTask, ops *[]checkpoint.NonSourceTask)

func (*SrcSubTopo) GetMetrics

func (s *SrcSubTopo) GetMetrics() []any

func (*SrcSubTopo) GetName

func (s *SrcSubTopo) GetName() string

func (*SrcSubTopo) GetSource

func (s *SrcSubTopo) GetSource() node.DataSourceNode

func (*SrcSubTopo) LinkTopo

func (s *SrcSubTopo) LinkTopo(parentTopo *def.PrintableTopo, parentJointName string)

func (*SrcSubTopo) MergeSrc

func (s *SrcSubTopo) MergeSrc(parentTopo *def.PrintableTopo)

func (*SrcSubTopo) Open

func (s *SrcSubTopo) Open(ctx api.StreamContext, parentErrCh chan<- error)

func (*SrcSubTopo) OpsCount

func (s *SrcSubTopo) OpsCount() int

func (*SrcSubTopo) RemoveMetrics

func (s *SrcSubTopo) RemoveMetrics(ruleId string)

RemoveMetrics is called when the rule is deleted

func (*SrcSubTopo) RemoveOutput

func (s *SrcSubTopo) RemoveOutput(name string) error

func (*SrcSubTopo) StoreSchema

func (s *SrcSubTopo) StoreSchema(ruleID, dataSource string, schema map[string]*ast.JsonStreamField, isWildCard bool)

func (*SrcSubTopo) SubMetrics

func (s *SrcSubTopo) SubMetrics() (keys []string, values []any)

type Topo

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

Topo is the runtime DAG for a rule It only run once. If the rule restarts, another topo is created.

func NewWithNameAndOptions

func NewWithNameAndOptions(name string, options *def.RuleOption) (*Topo, error)

func (*Topo) AddOperator

func (s *Topo) AddOperator(inputs []node.Emitter, operator node.OperatorNode) *Topo

func (*Topo) AddSink

func (s *Topo) AddSink(inputs []node.Emitter, snk node.DataSinkNode) *Topo

func (*Topo) AddSinkAlterOperator

func (s *Topo) AddSinkAlterOperator(sink *node.SinkNode, operator node.OperatorNode) *Topo

func (*Topo) AddSrc

func (s *Topo) AddSrc(src node.DataSourceNode) *Topo

func (*Topo) Cancel

func (s *Topo) Cancel()

Cancel may be called multiple times so must be idempotent

func (*Topo) GetContext

func (s *Topo) GetContext() api.StreamContext

func (*Topo) GetCoordinator

func (s *Topo) GetCoordinator() *checkpoint.Coordinator

func (*Topo) GetMetrics

func (s *Topo) GetMetrics() (keys []string, values []any)

func (*Topo) GetMetricsV2

func (s *Topo) GetMetricsV2() map[string]map[string]any

func (*Topo) GetName

func (s *Topo) GetName() string

func (*Topo) GetStreams

func (s *Topo) GetStreams() []string

func (*Topo) GetTopo

func (s *Topo) GetTopo() *def.PrintableTopo

func (*Topo) HasOpen

func (s *Topo) HasOpen() bool

func (*Topo) Open

func (s *Topo) Open() <-chan error

func (*Topo) RemoveMetrics

func (s *Topo) RemoveMetrics()

func (*Topo) ResetStreamOffset

func (s *Topo) ResetStreamOffset(name string, input map[string]interface{}) error

func (*Topo) SetStreams

func (s *Topo) SetStreams(streams []string)

func (*Topo) WaitClose

func (s *Topo) WaitClose()

Jump to

Keyboard shortcuts

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