Documentation ¶
Overview ¶
Package throttle implements throttle strategies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptCloseChan ¶
func OptCloseChan(c <-chan struct{}) func(*Type)
OptCloseChan sets a read-only channel that, if closed, will interrupt a retry throttle early.
func OptMaxUnthrottledRetries ¶
OptMaxUnthrottledRetries sets the maximum number of consecutive retries that will be attempted before throttling will begin.
func OptThrottlePeriod ¶
OptThrottlePeriod sets the static period of time that throttles will last.
Types ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
Type is a throttle of retries to avoid endless busy loops when a message fails to reach its destination. This isn't intended to be used for hitting load balanced resources and therefore doesn't implement anything clever like exponential backoff.
Click to show internal directories.
Click to hide internal directories.