publish

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 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 Strategy

type Strategy struct {

	// Publish channel is used to trigger the publication of snapshots.
	Publish chan struct{}
	// contains filtered or unexported fields
}

Strategy is a heuristic model for deciding when to publish snapshots. It tries to detect quiesce points for events with a total bounded wait time.

func NewStrategy

func NewStrategy(
	maxWaitDuration time.Duration,
	quiesceDuration time.Duration,
	timerFrequency time.Duration) *Strategy

NewStrategy creates a new strategy with the given values.

func NewStrategyWithDefaults

func NewStrategyWithDefaults() *Strategy

NewStrategyWithDefaults creates a new strategy with default values.

func (*Strategy) Close

func (s *Strategy) Close()

func (*Strategy) OnChange

func (s *Strategy) OnChange()

Jump to

Keyboard shortcuts

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