mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-29 00:17:46 +00:00
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:
parent
3e9c4b4f17
commit
3dfaef50d7
@ -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
|
// rateLimitingType wraps an Interface and provides rateLimited re-enquing
|
||||||
type rateLimitingType struct {
|
type rateLimitingType struct {
|
||||||
DelayingInterface
|
DelayingInterface
|
||||||
|
Loading…
Reference in New Issue
Block a user