Skip to content
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

Expand MapeoRPC to handle connections to local peers, and rename to LocalPeers #355

Closed
gmaclennan opened this issue Oct 26, 2023 · 0 comments · Fixed by #356
Closed

Expand MapeoRPC to handle connections to local peers, and rename to LocalPeers #355

gmaclennan opened this issue Oct 26, 2023 · 0 comments · Fixed by #356

Comments

@gmaclennan
Copy link
Member

gmaclennan commented Oct 26, 2023

Description

Working on the integration of LocalDiscovery and MapeoRPC for sync, I'm ending up with pieces of code throughout both MapeoManager and MapeoProject tying the pieces together. The sharing of peer names must update a peer list held somewhere, so we can expose listLocalPeers.

I think it makes more sense to encapsulate the code in a slightly modified version of the existing MapeoRPC class, handling device info events internally to update a property on the peer class and exposing the protomux instance so we can use the peers from here for sync / replication in project instances.

Public methods:

  • sendInvite()
  • sendInviteResponse()
  • sendDeviceInfo()
  • disconnectAllPeers() -> to be added post-MVP

Events:

  • peers - when the connected peers changes
  • invite - when an invite is received
@gmaclennan gmaclennan changed the title Create LocalPeers class for RPC and local discovery Expand MapeoRPC to handle connections to local peers, and rename to LocalPeers Oct 26, 2023
@gmaclennan gmaclennan linked a pull request Oct 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant