Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9bc727e

Browse files
authored
chore: add support for one-way websockets to backend (#16853)
Closes#16775## Changes made- Added `OneWayWebSocket` function that establishes WebSocketconnections that don't allow client-to-server communication- Added tests for the new function- Updated API endpoints to make new WS-based endpoints, and markprevious SSE-based endpoints as deprecated- Updated existing SSE handlers to use the same core logic as the new WShandlers## Notes- Frontend changes handled via#16855
1 parentd3050a7 commit9bc727e

File tree

21 files changed

+1720
-190
lines changed

21 files changed

+1720
-190
lines changed

‎coderd/apidoc/docs.go

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/coderd.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,8 @@ func New(options *Options) *API {
12481248
httpmw.ExtractWorkspaceParam(options.Database),
12491249
)
12501250
r.Get("/",api.workspaceAgent)
1251-
r.Get("/watch-metadata",api.watchWorkspaceAgentMetadata)
1251+
r.Get("/watch-metadata",api.watchWorkspaceAgentMetadataSSE)
1252+
r.Get("/watch-metadata-ws",api.watchWorkspaceAgentMetadataWS)
12521253
r.Get("/startup-logs",api.workspaceAgentLogsDeprecated)
12531254
r.Get("/logs",api.workspaceAgentLogs)
12541255
r.Get("/listening-ports",api.workspaceAgentListeningPorts)
@@ -1280,7 +1281,8 @@ func New(options *Options) *API {
12801281
r.Route("/ttl",func(r chi.Router) {
12811282
r.Put("/",api.putWorkspaceTTL)
12821283
})
1283-
r.Get("/watch",api.watchWorkspace)
1284+
r.Get("/watch",api.watchWorkspaceSSE)
1285+
r.Get("/watch-ws",api.watchWorkspaceWS)
12841286
r.Put("/extend",api.putExtendWorkspace)
12851287
r.Post("/usage",api.postWorkspaceUsage)
12861288
r.Put("/dormant",api.putWorkspaceDormant)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp