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

feat: add $sync API methods #361

Merged
merged 15 commits into from
Nov 9, 2023
Merged

feat: add $sync API methods #361

merged 15 commits into from
Nov 9, 2023

Conversation

gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Oct 27, 2023

For now this simplifies the API (because we are only supporting local
sync, not remote sync over the internet) to:

  • project.$sync.getState()
  • project.$sync.start()
  • project.$sync.stop()
  • Events
    • sync-state

It's currently not possible to stop local discovery, nor is it possible
to stop sync of the metadata namespaces (auth, config, blobIndex). The
start and stop methods stop the sync of the data and blob namespaces.

Fixes #134. Stacked on #360, #358 and #356.

This renames SyncController to SyncApi and makes the replicate() method internal. This seemed an easier approach than creating a separate public API class that wraps the SyncController.

@gmaclennan gmaclennan self-assigned this Oct 27, 2023
@gmaclennan gmaclennan linked an issue Oct 27, 2023 that may be closed by this pull request
7 tasks
@gmaclennan gmaclennan changed the title feat: add $sync API methods feat: add $sync API methods Oct 27, 2023
For now this simplifies the API (because we are only supporting local
sync, not remote sync over the internet) to:

- `project.$sync.getState()`
- `project.$sync.start()`
- `project.$sync.stop()`
- Events
    - `sync-state`

It's currently not possible to stop local discovery, nor is it possible
to stop sync of the metadata namespaces (auth, config, blobIndex). The
start and stop methods stop the sync of the data and blob namespaces.

Fixes #134. Stacked on #360, #358 and #356.
* main:
  feat: `listLocalPeers()` & `local-peers` event (#360)
  feat: integrate LocalDiscovery & LocalPeers (#358)
  implement IconApi (#335)
  feat: MapeoRPC -> LocalPeers (#356)
  chore: update @mapeo/schema and @mapeo/sqlite-indexer (#357)
@gmaclennan gmaclennan changed the base branch from feat/list-local-peers to main November 9, 2023 07:07
@gmaclennan gmaclennan merged commit ca95b2f into main Nov 9, 2023
7 checks passed
gmaclennan added a commit that referenced this pull request Nov 9, 2023
* main:
  feat: add `$sync` API methods (#361)
  feat: `listLocalPeers()` & `local-peers` event (#360)
  feat: integrate LocalDiscovery & LocalPeers (#358)
  implement IconApi (#335)
  feat: MapeoRPC -> LocalPeers (#356)
  chore: update @mapeo/schema and @mapeo/sqlite-indexer (#357)
@gmaclennan gmaclennan deleted the feat/$sync-namespace branch November 9, 2023 07:22
gmaclennan added a commit that referenced this pull request Nov 9, 2023
* main:
  fix: fix core storage initialization in MapeoManager (#367)
  feat: add `$sync` API methods (#361)
  feat: `listLocalPeers()` & `local-peers` event (#360)
  feat: integrate LocalDiscovery & LocalPeers (#358)
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 this pull request may close these issues.

Add $sync namespace methods to project instance API
2 participants