trigger

package
v0.0.0-...-9d38f52 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Count

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

func AtCount

func AtCount(count int) *Count

AtCount count, in per key events, emit changes.

func (*Count) Delta

func (t *Count) Delta() *Count

func (*Count) Heuristic

func (t *Count) Heuristic(*progress.Heuristic)

func (*Count) Modified

func (t *Count) Modified(key string, v interface{}, vs map[window.Span][]interface{}) error

func (*Count) Start

func (t *Count) Start(signal func(keys []string) error) error

func (*Count) Stop

func (t *Count) Stop()

type Dormant

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

Dormant data trigger.

func WhenDormant

func WhenDormant(after time.Duration) *Dormant

WhenDormant after a given time, measured per key, emit changes.

func (*Dormant) Delta

func (t *Dormant) Delta() *Dormant

Delta of current and previous value should be emitted.

func (*Dormant) Heuristic

func (t *Dormant) Heuristic(*progress.Heuristic)

func (*Dormant) Modified

func (t *Dormant) Modified(key string, v interface{}, vs map[window.Span][]interface{}) error

Modified key, v is the incoming data, vs is v merged into previous values.

func (*Dormant) Start

func (t *Dormant) Start(signal func(keys []string) error) error

Start the trigger, signalling changed keys with the signal function.

func (*Dormant) Stop

func (t *Dormant) Stop()

Stop the trigger.

type Finished

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

func WhenFinished

func WhenFinished() *Finished

func (*Finished) Heuristic

func (t *Finished) Heuristic(h *progress.Heuristic)

func (*Finished) Modified

func (t *Finished) Modified(key string, v interface{}, vs map[window.Span][]interface{}) error

func (*Finished) Start

func (t *Finished) Start(signal func(keys []string) error) error

func (*Finished) Stop

func (t *Finished) Stop()

Stop the trigger.

type Period

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

func AtPeriod

func AtPeriod(period time.Duration) *Period

AtPeriod period, in processing time, emit changes.

func (*Period) Delta

func (t *Period) Delta() *Period

func (*Period) Heuristic

func (t *Period) Heuristic(*progress.Heuristic)

func (*Period) Modified

func (t *Period) Modified(key string, v interface{}, vs map[window.Span][]interface{}) error

func (*Period) Start

func (t *Period) Start(signal func(keys []string) error) error

func (*Period) Stop

func (t *Period) Stop()

type Trigger

type Trigger interface {
	Heuristic(*progress.Heuristic)
	Modified(key string, v interface{}, vs map[window.Span][]interface{}) error
	Start(func(keys []string) error) error
	Stop()
}

Trigger an action.

Jump to

Keyboard shortcuts

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