sliding_window

package
v0.9.71 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const FirstSequenceNumber = 1
View Source
const ProcessDelayWarningThreshold = 30

Variables

View Source
var HealthyThreshold float64 = 60

Functions

This section is empty.

Types

type SequenceGenerator

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

func NewSequenceGenerator

func NewSequenceGenerator() *SequenceGenerator

func (*SequenceGenerator) Next

func (generator *SequenceGenerator) Next() int64

type Watermark

type Watermark struct {
	ProcessTime time.Time
	EventTime   time.Time
}

(Output) Watermark is defined as the minimum process time of input(which may be blocked on enqueue) and active items in window.

func (Watermark) Healthy

func (w Watermark) Healthy() bool

type Window

type Window interface {
	AddWindowItem(item WindowItem)
	AckWindowItem(sequence int64)
	Size() int
	WaitingQueueLen() int
	Close()
	Watermark() Watermark
}

func NewStaticSlidingWindow

func NewStaticSlidingWindow(windowSize int, name string) Window

type WindowItem

type WindowItem interface {
	SequenceNumber() int64
	BeforeWindowMoveForward()
	EventTime() time.Time
	ProcessTime() time.Time
}

Jump to

Keyboard shortcuts

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