Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { Logger *zap.Logger // Function invoked to poll (required). Poll func(context.Context) // Determines the amount of time to sleep before the next poll (required). NextDelay func() time.Duration // Minimum amount of time to wait between polls. Defaults to 1s. MinDelay time.Duration // Maximum amount of time to wait between polls. MaxDelay time.Duration // Amount of random distortion to apply to the calculated delay. Must be in // the range [0..+1.0] (0% to 100%). Jitter float64 // Optional channel receiving a message when a new poll is requested. Notify <-chan struct{} // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.