-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor client-go/util/flowcontrol/throttle.go RateLimiter
- Introduce PassiveRateLimiter which implements all methods of previous RateLimiter except Accept() and Wait() - Change RateLimiter interface to extend PassiveRateLimiter by additionally implementing Accept() and Wait() - Make client-go/tools/record use PassiveRateLimiter Refactor EventSourceObjectSpamFilter, EventAggregator, EventCorrelator - EventSourceObjectSpamFilter, EventAggregator, EventCorrelator use clock.PassiveClock now. - This won't be a breaking change because even if a clock.Clock is passed, it still implements the clock.PassiveClock interface. - Extend clock.PassiveClock through Clock. - Replace pacakge local implementation of realClock with clock.RealClock - In flowcontrol/throttle.go split tokenBucketRateLimiters to use Clock and clock.PassiveClock. - Migrate client-go/tools/record tests from using IntervalClock to using SimpleIntervalClock (honest implementation of clock.PassiveClock) Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com> Kubernetes-commit: ac5c55f0bd853fcf883d9b8e1f5ef728a2fb5309
- Loading branch information
1 parent
191e5dc
commit b9fa896
Showing
6 changed files
with
84 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters