Skip to content

Commit

Permalink
Merge pull request #443 from fluxcd/default-rate-limiter
Browse files Browse the repository at this point in the history
Expose the default rate limiter
  • Loading branch information
darkowlzz authored Jan 10, 2023
2 parents 75f797c + a9070db commit 25ef474
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/controller/rate_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ func GetRateLimiter(opts RateLimiterOptions) ratelimiter.RateLimiter {
opts.MinRetryDelay,
opts.MaxRetryDelay)
}

// GetDefaultRateLimiter returns a new exponential failure
// ratelimiter.RateLimiter with the default configuration.
func GetDefaultRateLimiter() ratelimiter.RateLimiter {
return workqueue.NewItemExponentialFailureRateLimiter(
defaultMinRetryDelay,
defaultMaxRetryDelay)
}

0 comments on commit 25ef474

Please sign in to comment.