Documentation ¶
Index ¶
Constants ¶
View Source
const ( BaseDelay = 5 MaxDelay = 60 * 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecorRelatedJitter ¶
type DecorRelatedJitter struct { }
DecorRelatedJitter 去相关抖动退避 delay = min(最大等待时间, random(基础等待时间, 基础等待时间* 3);
func (*DecorRelatedJitter) ComputeDelayBeforeNextRetry ¶
func (d *DecorRelatedJitter) ComputeDelayBeforeNextRetry() int32
type EqualJitter ¶
type EqualJitter struct { }
EqualJitter 等抖动指数退避 delay = Exponential/2 + random(0, Exponential/2)
func (*EqualJitter) ComputeDelayBeforeNextRetry ¶
func (e *EqualJitter) ComputeDelayBeforeNextRetry() int32
type Exponential ¶
type Exponential struct { }
Exponential 指数退避 delay = min(最大等待时间, 基础等待时间 * (2^已重试次数))
func (*Exponential) ComputeDelayBeforeNextRetry ¶
func (e *Exponential) ComputeDelayBeforeNextRetry() int32
type RandomJitter ¶
type RandomJitter struct { }
RandomJitter 全抖动指数退避 delay = random(0, Exponential)
func (*RandomJitter) ComputeDelayBeforeNextRetry ¶
func (r *RandomJitter) ComputeDelayBeforeNextRetry() int32
Click to show internal directories.
Click to hide internal directories.