-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core implement ws server listener interface for subs and adverts (#189)
Add new callbacks to ServerListener: ``` fn on_subscribe(&self, _channel_id: ChannelId) {} fn on_unsubscribe(&self, _channel_id: ChannelId) {} fn on_client_advertise(&self, _channel: &ClientChannel) {} fn on_client_unadvertise(&self, _channel_id: ClientChannelId) {} ``` This mirrors how the callbacks are defined in the [Python implementation](https://github.com/foxglove/ws-protocol/blob/main/python/src/foxglove_websocket/server/__init__.py#L508), and they function in a similar way (e.g. not firing for duplicate or erroneous requests) I added RecordingServerListener to testutil to allow more easily testing ServerListener. I modified existing tests to verify these callbacks are called at the appropriate times with the expected arguments, and not called for duplicate requests.
- Loading branch information
Showing
11 changed files
with
525 additions
and
130 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.