Documentation
¶
Index ¶
Constants ¶
View Source
const ( LinearRetryPolicy = "linear" SlowStartRetryPolicy = "slowstart" )
View Source
const ( SlowStartInitialInterval = 1 * time.Second SlowStartLowerTimeBound = 300 * time.Millisecond SlowStartUpperTimeBound = 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Linear ¶
type Linear struct {
// contains filtered or unexported fields
}
Linear implements the RetryPolicy interface A linear retry policy resets its timer on a fixed interval ignoring any possible error
type RetryPolicy ¶
type RetryPolicy interface { // Reset resets the Timer in order to provide the next time event // Some retry policies might take into consideration the provided error in order to compute the next time event Reset(err string) // Timer returns the timer used by the respective retry policy Timer() *time.Timer }
RetryPolicy provides a worker the time intervals it will need in order to perform the push cycle
func New ¶
func New(rp *amsPb.RetryPolicy) (RetryPolicy, error)
New transforms the registered retry policy of a subscription to an the internal corresponding one that will be used by the respective worker
type RetryPolicyType ¶
type RetryPolicyType string
RetryPolicyType represents the available retry policies that the service supports
type Slowstart ¶
type Slowstart struct {
// contains filtered or unexported fields
}
Slowstart implements the retry policy interface A slowstart retry policy performs faster push cycles when there are no errors and slower ones when errors exist
Click to show internal directories.
Click to hide internal directories.