-
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
The current backoff implementation in process-compose
uses a (user-customizable) constant-time backoff with a minimum polling interval of 1 second.
However, users customizing a polling interval generally expect some form of exponential backoff in order to poll more frequently at the beginning of a process (when changes are more likely) and then less frequently as time goes on.
Go seems to have a decent backoff package by @cenkalti which exposes the following interface:
type ExponentialBackOff struct {
InitialInterval time.Duration
RandomizationFactor float64
Multiplier float64
MaxInterval time.Duration
// After MaxElapsedTime the ExponentialBackOff returns Stop.
// It never stops if MaxElapsedTime == 0.
MaxElapsedTime time.Duration
Stop time.Duration
Clock Clock
// contains filtered or unexported fields
}
Metadata
Metadata
Assignees
Labels
No labels