processor

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package processor is the smallest processor entity for which the watermark will strictly monotonically increase.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorEntitier

type ProcessorEntitier interface {
	GetName() string
}

ProcessorEntitier defines what can be a processor. The Processor is the smallest unit where the watermark will monotonically increase.

func NewProcessorEntity

func NewProcessorEntity(name string) ProcessorEntitier

NewProcessorEntity returns a new `ProcessorEntitier`.

type Watermark

type Watermark time.Time

Watermark is the monotonically increasing watermark. It is tightly coupled with ProcessorEntitier as the processor is responsible for monotonically increasing Watermark for that processor. NOTE: today we support only second progression of watermark, we need to support millisecond too.

func (Watermark) After added in v0.5.6

func (w Watermark) After(t time.Time) bool

func (Watermark) Before added in v0.6.2

func (w Watermark) Before(t time.Time) bool

func (Watermark) String

func (w Watermark) String() string
Example
location, _ := time.LoadLocation("UTC")
wm := Watermark(time.Unix(1651129200, 0).In(location))
fmt.Println(wm)
Output:

2022-04-28T07:00:00Z

func (Watermark) UnixMilli added in v0.6.2

func (w Watermark) UnixMilli() int64

Jump to

Keyboard shortcuts

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