-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: emit PendingContentReady event (#2302)
## Description This adds a new `LiveEvent` variant: `PendingContentReady`. It is emitted once, after sync was started, the list of pending content blobs becomes empty. This is the case if either all blobs from this sesion have been downloaded, or failed. I think this could help with simple examples like https://gist.github.com/dignifiedquire/efbd1a7a1da729494adb088d72f1ceaa#file-main-sync-rs-L84 It should not be used as a guarantee that all content is now available locally, and it should be used with a timeout usually, because it may very legally never be emitted (e.g. if the remote does not have all blobs themselves, or closes the connections, etc). ## Breaking Changes * `LiveEvent` now has a new variant `PendingContentReady`. This event is emitted after a sync completed and `Self::SyncFinished` was emitted. It signals that all currently pending downloads have been completed. Receiving this event does not guarantee that all content in the document is available. If blobs failed to download, this event will still be emitted after all operations completed. ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [ ] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information
Showing
6 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.