-
Notifications
You must be signed in to change notification settings - Fork 98
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
Clarify the ClientEvent that is sent to client.subscribe
#464
Conversation
7289a5a
to
5e37128
Compare
97c0f56
to
64d86be
Compare
Codecov Report
@@ Coverage Diff @@
## main #464 +/- ##
==========================================
+ Coverage 89.28% 89.50% +0.22%
==========================================
Files 67 67
Lines 5254 5375 +121
Branches 524 528 +4
==========================================
+ Hits 4691 4811 +120
Misses 381 381
- Partials 182 183 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks for your contribution. The structure and types of PeersChanged have been cleaned up more in this PR. 👍
I left a few comments.
The event order has been modified to be guaranteed yorkie-team/yorkie#479
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.
Thanks for your reply. Left additional questions.
Users can get all peers using client.getPeersByDocKey(doc.getKey()), so it is sufficient to only have peers(changedPeers info).
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.
LGTM. 👍
- Remove runWatchLoop when activating the client - Add sending of connected and disconnected events PeersChanged Event
…am#464) - Remove runWatchLoop when activating the client - Add sending of connected and disconnected events PeersChanged Event
What this PR does / why we need it?
Clarify the ClientEvent that is sent to client.subscribe
runWatchLoop
when activating the clientconnected
anddisconnected
eventsPeersChanged Event
Elaborate on the value of the
PeersChanged
eventas-is
PeersChanged
event provides the entire list of peers in its value, so it is necessary to find which peers have been changed.findDefectors
function is used to remove the cursor of the unwatched peer. https://github.com/yorkie-team/yorkie-js-sdk/pull/369/filesClientEvent
flow in test codeClientEvent
flow inclient.subscribe
Any background context you want to provide?
What are the relevant tickets?
Fixes #
Checklist