-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace router svcAddrUpdateLocks with new throttler package for code readability&reusability #1047
Conversation
ef47068
to
c9d30d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, LGTM!
We could change the executor to use this package too, at some point.
router/functionHandler.go
Outdated
@@ -482,24 +491,32 @@ func (fh *functionHandler) getServiceEntry() (serviceUrl *url.URL, serviceUrlFro | |||
// To prevent multiple update requests will be sent to executor and make executor overloaded, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment since there is no visible goroutine here?
throttler/throttler.go
Outdated
timeExpiry time.Duration | ||
} | ||
|
||
// Throttler is a simple throttling mechanism implementation provides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... is a simple throttling mechanism that provides the ability to...
3b2784c
to
18eaa8b
Compare
e06a494
to
35b9be0
Compare
Rename svcAddrUpdateLock to Throttler and move it to top-level directory as package for code import.
7264164
to
f828a31
Compare
Address followup comments in #991 and add new throttler package.
This change is