intervalpolicy

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntervalPolicy

type IntervalPolicy interface {
	// Evaluate evaluates next interval.
	Evaluate()
	// Reset resets the interval of the interval policy.
	Reset()
	// GetInterval returns current interval.
	GetInterval() time.Duration
	// GetMaxInterval returns the max interval that can be used to sync bundles.
	GetMaxInterval() time.Duration
}

IntervalPolicy defines a policy to return interval based on the received events.

func NewExponentialBackoffPolicy

func NewExponentialBackoffPolicy(interval time.Duration) IntervalPolicy

NewExponentialBackoffPolicy creates new exponential backoff interval policy.

Jump to

Keyboard shortcuts

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