-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add awareness features to handle server state (#170)
* Move the Awareness from pycrdt_websocket to pycrdt project, and add some features to it * Add tests on awareness * use google style docstring * Generate the message in test for clarity * Add docstring and tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove the unused logger * Remove typing from test * Apply suggestions from code review Co-authored-by: David Brochart <[email protected]> * Add missing docstring * Apply suggestions from code review Co-authored-by: David Brochart <[email protected]> * Remove the default user in the awareness * Remove totally the conept of user in the awareness * Add subscription id * update docstring according to review * Remove on_change callback * Observe both local and remote changes, and add a function to encode the changes * mypy * Mimic awareness.js * Check if state is set before deleting * Add create_awareness_message() and write_message() --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: David Brochart <[email protected]>
- Loading branch information
1 parent
bbf4b1d
commit fd74268
Showing
5 changed files
with
574 additions
and
31 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
Oops, something went wrong.