utils

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const MaxIntervalJitterFactor = 1 + defaultRandomizationFactor

MaxIntervalJitterFactor is the largest multiple of a ticker's configured max interval that a single tick can take. Anything timing out on a periodic announcement driven by NewBackoffTicker has to allow for it: a ticker with a 120s max interval can legitimately stay silent for 180s.

Variables

This section is empty.

Functions

func BackoffInitialInterval added in v0.13.1

func BackoffInitialInterval(i time.Duration) expBackoffOpt

func BackoffMaxElapsedTime added in v0.13.1

func BackoffMaxElapsedTime(i time.Duration) expBackoffOpt

func BackoffMaxInterval added in v0.13.1

func BackoffMaxInterval(i time.Duration) expBackoffOpt

func BackoffMultiplier added in v0.13.1

func BackoffMultiplier(i float64) expBackoffOpt

func BackoffRandomizationFactor added in v0.13.1

func BackoffRandomizationFactor(i float64) expBackoffOpt

func Leader added in v0.8.1

func Leader(actives []string) string

func NewBackoffTicker added in v0.13.1

func NewBackoffTicker(o ...expBackoffOpt) *backoff.Ticker

func NextIP added in v0.7.2

func NextIP(defaultIP string, ips []string) string

func RandStringRunes

func RandStringRunes(n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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