backoffpolicy

package
v0.0.0-...-f6c5ffc Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPolicy

func NewPolicy(config Config) backoff.Policy

NewPolicy creates a new backoff policy from config.

Types

type Config

type Config struct {
	Policy string

	// Common
	MaxRetries     int
	MaxElapsedTime time.Duration

	// Constant
	Delay time.Duration

	// Exponential
	Interval     time.Duration
	MaxInterval  time.Duration
	JitterFactor float64
	Factor       float64
}

Config contains

func (Config) Validate

func (c Config) Validate() error

Validate checks that the configuration is valid.

Jump to

Keyboard shortcuts

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