Documentation ¶
Index ¶
Constants ¶
View Source
const RetryStages = 3
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RetryState ¶
type RetryState uint8
const ( KeepRetrying RetryState = iota StopRetrying RemoveCompletely )
type RetryStrategy ¶
type RetryStrategy interface { // Retry initiates resend for the given ids. // When id was resent and is still valid, it should be returned back by calling (repeatFn). // When some ids were not resent, then these should be returned back by calling (bulkOverflowFn). Retry(ids []RetryID, repeatFn func(RetryID), bulkOverflowFn func([]RetryID)) CheckState(RetryID) RetryState Remove([]RetryID) }
type StagedController ¶
type StagedController struct {
// contains filtered or unexported fields
}
func (*StagedController) Add ¶
func (p *StagedController) Add(id RetryID, weight uint, strategy RetryStrategy)
func (*StagedController) AddHeadForRetry ¶
func (p *StagedController) AddHeadForRetry(id RetryID)
func (*StagedController) InitStages ¶
func (p *StagedController) InitStages(minHeadBatchWeight uint, periods [RetryStages]int)
for initialization only
func (*StagedController) NextCycle ¶
func (p *StagedController) NextCycle(strategy RetryStrategy)
Click to show internal directories.
Click to hide internal directories.