configproposalmanager

package
v0.0.0-...-5782b8f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackoffInfo

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

type BackoffManager

type BackoffManager struct {
	BackoffInfo
	// contains filtered or unexported fields
}

func BackoffManagerNew

func BackoffManagerNew(minBO, maxInitBO, maxBO int32, signalChan chan RetryInfo, factor float64, softFac bool, constBackoff bool) *BackoffManager

func (*BackoffManager) CheckAndHandleBackoff

func (bm *BackoffManager) CheckAndHandleBackoff(inst int32, attemptedBal lwcproto.ConfigBal, preempter lwcproto.ConfigBal, prempterPhase stdpaxosproto.Phase) (bool, int32)

func (*BackoffManager) ClearBackoff

func (bm *BackoffManager) ClearBackoff(inst int32)

func (*BackoffManager) ShouldBackoff

func (bm *BackoffManager) ShouldBackoff(inst int32, preempter lwcproto.ConfigBal, preempterPhase stdpaxosproto.Phase) bool

func (*BackoffManager) StillRelevant

func (bm *BackoffManager) StillRelevant(backoff RetryInfo) bool

type IntRange

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

range specification, note that min <= max

func (*IntRange) NextRandom

func (ir *IntRange) NextRandom(r *rand.Rand) int

get next random value within the interval including min and max

type RetryInfo

type RetryInfo struct {
	Inst           int32
	AttemptedBal   lwcproto.ConfigBal
	PreempterBal   lwcproto.ConfigBal
	PreempterAt    stdpaxosproto.Phase
	Prev           int32
	TimesPreempted int32
}

Jump to

Keyboard shortcuts

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