window

package
v0.5.0-beta3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceptor

type Acceptor interface {
	Accept(ctx context.Context, input interface{}) (err error)
	Reset(whiteboard Whiteboard)
}

type CountAggregator

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

func (*CountAggregator) Accept

func (ca *CountAggregator) Accept(ctx context.Context, input interface{}) (err error)

func (*CountAggregator) Reset

func (ca *CountAggregator) Reset(whiteboard Whiteboard)

type DurationTrigger

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

func (*DurationTrigger) Accept

func (trigger *DurationTrigger) Accept(ctx context.Context, input interface{}) (err error)

func (*DurationTrigger) Reset

func (trigger *DurationTrigger) Reset(whiteboard Whiteboard)

type EmptyAggregator

type EmptyAggregator struct{}

func (EmptyAggregator) Accept

func (agg EmptyAggregator) Accept(ctx context.Context, input interface{}) (err error)

func (EmptyAggregator) Materialize

func (agg EmptyAggregator) Materialize(ctx context.Context) error

func (EmptyAggregator) Reset

func (agg EmptyAggregator) Reset(whiteboard Whiteboard)

type Materializer

type Materializer interface {
	Materialize(ctx context.Context) error
}

type MaterializerWrapper

type MaterializerWrapper func(Materializer) Materializer

type Trigger

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

func (*Trigger) ResetTrigger

func (tm *Trigger) ResetTrigger()

func (*Trigger) Trigger

func (tm *Trigger) Trigger()

func (*Trigger) Triggered

func (tm *Trigger) Triggered() bool

type Whiteboard

type Whiteboard struct {
	StartTime time.Time
	Seq       uint64
	Trigger   *Trigger
	Err       error
	// contains filtered or unexported fields
}

type Window

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

func New

func New(ag Acceptor, materializer Materializer, wraps ...Wrapper) *Window

func (*Window) Accept

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

func (*Window) CloseWithContext

func (w *Window) CloseWithContext(ctx context.Context) error

func (*Window) Closed

func (w *Window) Closed() <-chan struct{}

func (*Window) Current

func (w *Window) Current(ctx context.Context) (Whiteboard, bool)

func (*Window) WaitUntilOk

func (w *Window) WaitUntilOk(ctx context.Context) error

type Wrapper

type Wrapper func(Acceptor) Acceptor

func CounterWrapper

func CounterWrapper(maxCount uint64) Wrapper

func DurationWrapper

func DurationWrapper(duration time.Duration) Wrapper

Jump to

Keyboard shortcuts

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