-
Notifications
You must be signed in to change notification settings - Fork 164
Unified streaming endpoint #8504
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
Conversation
| } | ||
|
|
||
| var level runtimev1.LogLevel | ||
| if levelStr := req.URL.Query().Get("logs_level"); levelStr != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this by convention that logs_ is prefixed to all api param names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, all the params that go to WatchLogsRequest have logs_ prefix, all the params for WatchFilesRequest have files_ prefix, etc.
* Unified streaming endpoint * Lint * Self review * Self review * Self review * Fix int cast * Review
Implements a unified streaming endpoint that exposes the runtime server's streaming RPCs over a single SSE endpoint with the ability to serve multiple streams on a single connection.
This can be used to reduce the number of concurrent streaming connections, which may help alleviate blocked connections due to browsers limiting unsecured/localhost connections to 6 per origin.
Example:
Details:
<runtime-host>/v1/<instance-id>/sseevents: comma-separated list of event types to subscribe to. Supported values are:file,resource,log.files_replay: maps to the underlyingWatchFilesRequest.Replayresources_kind: maps to the underlyingWatchResourcesRequest.Kindresources_replay: maps to the underlyingWatchResourcesRequest.Replaylogs_replay: maps to the underlyingWatchLogsRequest.Replaylogs_replay_limit: maps to the underlyingWatchLogsRequest.ReplayLimitlogs_level: maps to the underlyingWatchLogsRequest.LevelCloses https://linear.app/rilldata/issue/PLAT-356/unified-endpoint-for-streaming-apis
Checklist: