Add clock interface to disruption controller

To be able to write more precise unit tests in the future

Change-Id: I8f45947dfacca501acd856849bd978fad0f735cd

Kubernetes-commit: dad8454ebb87ba7af897537db6d34033127bbfef
This commit is contained in:
Aldo Culquicondor 2022-07-26 15:11:53 -04:00 committed by Kubernetes Publisher
parent 3e9c4b4f17
commit 3dfaef50d7

View File

@ -50,6 +50,13 @@ func NewNamedRateLimitingQueue(rateLimiter RateLimiter, name string) RateLimitin
}
}
func NewRateLimitingQueueWithDelayingInterface(di DelayingInterface, rateLimiter RateLimiter) RateLimitingInterface {
return &rateLimitingType{
DelayingInterface: di,
rateLimiter: rateLimiter,
}
}
// rateLimitingType wraps an Interface and provides rateLimited re-enquing
type rateLimitingType struct {
DelayingInterface