backoff

package
v1.38.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBackoff

func WithBackoff(config Config) heartbeat.HandleOption

WithBackoff initializes and returns a heartbeat handle option, which can be used in a heartbeat processing pipeline to prevent trying to send a heartbeat when the api is unresponsive.

Types

type Config

type Config struct {
	// At is the time when the first failure happened.
	At time.Time
	// Retries is the number of attempts to connect.
	Retries int
	// V is an instance of Viper.
	V *viper.Viper
}

Config defines backoff data.

Jump to

Keyboard shortcuts

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