streaming

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCacheSize = 2
)

Functions

func New

func New(source flow.Source) flow.Flow

Types

type TopNOption

type TopNOption func(aggregator *topNAggregator)

func OrderBy

func OrderBy(sort TopNSort) TopNOption

func WithSortKeyExtractor

func WithSortKeyExtractor(sortKeyExtractor func(flow.StreamRecord) int64) TopNOption

type TopNSort

type TopNSort uint8
const (
	DESC TopNSort = iota
	ASC
)

type TriggerResult

type TriggerResult bool
const (
	FIRE     TriggerResult = true
	CONTINUE               = false
)

type TumblingTimeWindows

type TumblingTimeWindows struct {
	// internal state of the sliding time window
	flow.ComponentState
	// contains filtered or unexported fields
}

func NewTumblingTimeWindows

func NewTumblingTimeWindows(size time.Duration) *TumblingTimeWindows

func (*TumblingTimeWindows) AssignWindows

func (s *TumblingTimeWindows) AssignWindows(timestamp int64) ([]flow.Window, error)

AssignWindows assigns windows according to the given timestamp

func (*TumblingTimeWindows) Exec

func (s *TumblingTimeWindows) Exec(downstream flow.Inlet)

func (*TumblingTimeWindows) In

func (s *TumblingTimeWindows) In() chan<- flow.StreamRecord

func (*TumblingTimeWindows) Out

func (s *TumblingTimeWindows) Out() <-chan flow.StreamRecord

func (*TumblingTimeWindows) Setup

func (s *TumblingTimeWindows) Setup(ctx context.Context) (err error)

func (*TumblingTimeWindows) Teardown

func (s *TumblingTimeWindows) Teardown(ctx context.Context) error

type Tuple2

type Tuple2 struct {
	V1 interface{} `json:"v1"`
	V2 interface{} `json:"v2"`
}

func (*Tuple2) Equal

func (t *Tuple2) Equal(other *Tuple2) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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