-
Notifications
You must be signed in to change notification settings - Fork 18
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
controlplane/control: Introduce peer manager #361
Conversation
6565b83
to
b41c772
Compare
meta.SetStatusCondition(&m.pr.Status.Conditions, reachableCond) | ||
m.lock.Unlock() | ||
|
||
m.statusCallback(m.pr) |
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.
Can you add a comment why you call the callback
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.
Sure (it's for non-CRD mode, which does not watch Peer status).
} | ||
|
||
// Start the peer manager. | ||
func (m *peerManager) Start() error { |
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.
Where do you call this function?
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.
It's called by the runnable manager, which subscribes here:
clusterlink/cmd/cl-controlplane/app/server.go
Line 205 in b41c772
runnableManager.Add(controlManager) |
This commit adds the peerManager which is responsible for monitoring peers, and updating peer status (reachable or not). Signed-off-by: Or Ozeri <[email protected]>
This PR adds the peerManager which is responsible for monitoring peers, and updating peer status (reachable or not).