managers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package managers holds the routines that manage tables across the lifetime of a pipeline, rather than per batch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tumbling

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

Tumbling publishes and then removes rows whose window has closed. The two SQL statements come from the config and define what "closed" means, so the manager itself carries no notion of time.

func NewTumbling

func NewTumbling(
	conn adbc.Connection,
	collectSQL, deleteSQL string,
	pollInterval time.Duration,
	sink core.Sink,
	lock *sync.Mutex,
	opts ...TumblingOption,
) *Tumbling

func (*Tumbling) Poll

func (m *Tumbling) Poll(ctx context.Context) error

Poll publishes any closed windows and removes them from the table.

func (*Tumbling) Start

func (m *Tumbling) Start(ctx context.Context) error

Start polls until the context is cancelled, then polls once more so windows that closed during the final interval are not stranded in the table.

type TumblingOption

type TumblingOption func(*Tumbling)

func WithLogger

func WithLogger(l *zap.Logger) TumblingOption

Jump to

Keyboard shortcuts

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