Commit Graph

5 Commits

Author SHA1 Message Date
Madhav Jivrajani
b9fa896d5d 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
2021-08-25 21:56:26 +05:30
Tim Hockin
bcf88f084d Update golang.org/x/time/rate (#104014)
* Add failing test case

* Update golang.org/x/time/rate

* Call update-internal-modules from update-vendor

Kubernetes-commit: 09dc055984e9532f29f37acae7aea7a979ded764
2021-07-30 02:27:36 +00:00
chenjun.cj
8f99f83432 flowcontrol context aware and fix request may hang issue
Kubernetes-commit: ce8805f95fcf6540397eaa60b8d84db752f05eea
2019-06-21 12:17:46 +08:00
Jordan Liggitt
7392f7f78f Remove Saturation() from rate limiter interface
Kubernetes-commit: a9ed90f227f07fab2da75541d57a5366ddb38f66
2018-01-19 01:59:33 -05:00
Kubernetes Publisher
fcdf37233b published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub)

copied from https://github.com/kubernetes/kubernetes.git, branch master,
last commit is baaaf26609565b4299008018486ec75fb30903eb
2017-01-25 15:19:43 +00:00