Clarified comments

This commit is contained in:
Alexander Zimmermann 2020-02-07 09:09:49 +01:00
parent a1c837022c
commit e0b1e9206d
No known key found for this signature in database
GPG Key ID: EA628F56C895E758

View File

@ -29,14 +29,14 @@ type FixedItemIntervalRateLimiter struct {
var _ workqueue.RateLimiter = &FixedItemIntervalRateLimiter{}
// NewFixedItemIntervalRateLimiter creates a new instance of an RateLimiter using a fixed interval
// NewFixedItemIntervalRateLimiter creates a new instance of a RateLimiter using a fixed interval
func NewFixedItemIntervalRateLimiter(interval time.Duration) workqueue.RateLimiter {
return &FixedItemIntervalRateLimiter{
interval: interval,
}
}
// When gets an item and gets to decide how long that item should wait
// When returns the interval of the rate limiter
func (r *FixedItemIntervalRateLimiter) When(item interface{}) time.Duration {
return r.interval
}
@ -46,8 +46,7 @@ func (r *FixedItemIntervalRateLimiter) NumRequeues(item interface{}) int {
return 1
}
// Forget indicates that an item is finished being retried. Doesn't matter whether its for perm failing
// or for success, we'll stop tracking it
// Forget indicates that an item is finished being retried.
func (r *FixedItemIntervalRateLimiter) Forget(item interface{}) {
}