window

package
v0.5.0-beta1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator interface {
	Aggregate(ctx context.Context, item Whiteboard, input interface{}) (err error)

	// return new whiteboard data
	ResetData(ctx context.Context, last Whiteboard) interface{}
}

type Trigger

type Trigger interface {
	Accept(item Whiteboard, input interface{})
	Wait(ctx context.Context) (uint64, bool)
	Reset(nextSeq uint64)
}

type Whiteboard

type Whiteboard struct {
	StartTime time.Time
	LastData  interface{}
	Data      interface{}
	Seq       uint64
	Count     int32
	// contains filtered or unexported fields
}

type Window

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

func New

func New(ag Aggregator, whiteBoardData interface{}, triggers []Trigger) *Window

func (*Window) Accept

func (w *Window) Accept(ctx context.Context, input interface{}) error

func (*Window) Close

func (w *Window) Close(ctx context.Context, input interface{}) error

func (*Window) WaitChan

func (w *Window) WaitChan() <-chan Whiteboard

Jump to

Keyboard shortcuts

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