strategy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 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 BackOff

type BackOff struct {
	// contains filtered or unexported fields
}

func NewBackOffStrategy

func NewBackOffStrategy(proportion float64, options ...OptionFunc) *BackOff

func (*BackOff) GetNext

func (bs *BackOff) GetNext() int

func (*BackOff) Reset

func (bs *BackOff) Reset()

type OptionFunc

type OptionFunc func(*strategyOption)

func WithIndexFactor

func WithIndexFactor(d int) OptionFunc

func WithInitTime

func WithInitTime(d int) OptionFunc

func WithMaxBackoffTime

func WithMaxBackoffTime(d int) OptionFunc

type RetryStrategy

type RetryStrategy interface {
	GetNext() int
	Reset()
}

Jump to

Keyboard shortcuts

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