retrypolicytest

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RetryPolicyCustom

type RetryPolicyCustom struct{}

RetryPolicyCustom is a retry policy demonstrating trivial customization.

func (*RetryPolicyCustom) NextRetry

func (p *RetryPolicyCustom) NextRetry(job *rivertype.JobRow) time.Time

type RetryPolicyInvalid

type RetryPolicyInvalid struct{}

RetryPolicyInvalid is a retry policy that returns invalid timestamps.

func (*RetryPolicyInvalid) NextRetry

func (p *RetryPolicyInvalid) NextRetry(job *rivertype.JobRow) time.Time

type RetryPolicyNoJitter

type RetryPolicyNoJitter struct {
	baseservice.BaseService
}

RetryPolicyNoJitter is identical to default retry policy except that it leaves off the jitter to make checking against it more convenient.

func (*RetryPolicyNoJitter) NextRetry

func (p *RetryPolicyNoJitter) NextRetry(job *rivertype.JobRow) time.Time

type RetryPolicySlow added in v0.21.0

type RetryPolicySlow struct{}

RetryPolicySlow is a retry policy that has a very slow retry interval. This is used in tests that check retries to make sure that in slower environments (like GitHub Actions), jobs aren't accidentally set back to available or running before a paused test case can check to make sure it's in a retryable state.

func (*RetryPolicySlow) Interval added in v0.21.0

func (p *RetryPolicySlow) Interval() time.Duration

Interval is the slow retry interval exposed for use in test case assertions. Unlike the standard retry policy, RetryPolicySlow's interval is constant regardless of which attempt number the job was on.

func (*RetryPolicySlow) NextRetry added in v0.21.0

func (p *RetryPolicySlow) NextRetry(job *rivertype.JobRow) time.Time

Jump to

Keyboard shortcuts

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