-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
v3rpc: online defrag toggles gRPC health server serving status #16836
Conversation
0d65345
to
a53af18
Compare
cc @serathius |
65a95ef
to
36059b5
Compare
Signed-off-by: Chao Chen <[email protected]>
36059b5
to
8a6c133
Compare
type HealthNotifier interface { | ||
StartServe() | ||
StopServe(reason string) | ||
type notifier interface { |
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.
Nit: The previous name HealthNotifier
makes more sense than notifier
, because it isn't defined inside package "health
".
Overall this PR is a little over-engineering. Both (*maintenanceServer) Defragment
and (*healthChecker) StopServe
are in the same package api/v3rpc
, we don't have to necessarily introduce or refine the interface for now.
Anyway, not a big deal for now.
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.
On the other side, we should avoid the other extreme. Fact that structs are in single package doesn't mean that they should access all internal methods. Having a internal interface doesn't complicate code too much, but it clarifies the interned usage.
Backport from 3.6 in etcd-io#16836 Co-authored-by: Chao Chen <[email protected]> Signed-off-by: Thomas Jungblut <[email protected]>
Follow up of #16278
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.