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

Enable subscribing to signals/events with an HTTP endpoint in statusd #5803

Closed
igor-sirotin opened this issue Sep 5, 2024 · 1 comment · Fixed by #5806
Closed

Enable subscribing to signals/events with an HTTP endpoint in statusd #5803

igor-sirotin opened this issue Sep 5, 2024 · 1 comment · Fixed by #5806
Assignees
Labels

Comments

@igor-sirotin
Copy link
Collaborator

Problem

Desktop and Mobile get signals/events from status-go by settings a c-binding callback here:

var mobileSignalHandler MobileSignalHandler

This is not possible to do with RPC functional tests, which use HTTP RPC API of statusd.
We should provide a way to subscribe to this events.

Implementation

There're 2 options:

  1. WebSocket
    Implement a websocket that will simply publish all arising events.
  2. Polling
    Implement an RPC endpoint PopEvents. All events are enqueued and can be popped with this endpoint.

The pros and cons are pretty obvious. WebSocket is a more robust solution, but might be more difficult to use in tests.


Having such endpoint will greatly improve the abilities of the functional tests.

@igor-sirotin
Copy link
Collaborator Author

cc @antdanchenko

@igor-sirotin igor-sirotin changed the title Enable subscribing to signals/events with an HTTP endpoint Enable subscribing to signals/events with an HTTP endpoint in statusd Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant