tide

package module
v0.0.0-...-4febbb3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: BSD-3-Clause Imports: 9 Imported by: 2

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(arr []live.Data)

type Option

type Option func(tide *Tide)

func WithBeatInterval

func WithBeatInterval(interval time.Duration) Option

func WithHandDriven

func WithHandDriven(fNow func() time.Time) Option

func WithLogger

func WithLogger(log slog.Logger) Option

type Tide

type Tide struct {
	slog.Logger
	// contains filtered or unexported fields
}

func NewTide

func NewTide(name string, maxLen int, maxDelay time.Duration, fn Func, opts ...Option) (tide *Tide)

func (*Tide) Flush

func (x *Tide) Flush(ctx context.Context) error

func (*Tide) Launch

func (x *Tide) Launch()

func (*Tide) Len

func (x *Tide) Len() int

func (*Tide) NumProcessed

func (x *Tide) NumProcessed() int64

func (*Tide) Push

func (x *Tide) Push(v live.Data)

func (*Tide) PushUnique

func (x *Tide) PushUnique(v live.Data, hint any, overwrite bool)

func (*Tide) Shutdown

func (x *Tide) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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