Skip to content

feat(healthcheck): add websocket report #7689

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

Merged
merged 8 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! feat(healthcheck): add websocket report
  • Loading branch information
coadler committed May 30, 2023
commit e3182d7adf4cb2d22a7867309019be6f7bed72de
28 changes: 28 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -788,13 +788,6 @@ func New(options *Options) *API {

r.Get("/coordinator", api.debugCoordinator)
r.Get("/health", api.debugDeploymentHealth)
// @Summary Debug Info Deployment Health
// @ID debug-info-deployment-health
// @Security CoderSessionToken
// @Produce json
// @Tags Debug
// @Success 200 {object} healthcheck.Report
// @Router /debug/health [get]
r.Get("/ws", healthcheck.WebsocketEchoServer{}.ServeHTTP)
})
})
Expand Down
14 changes: 14 additions & 0 deletions coderd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,17 @@ func (api *API) debugDeploymentHealth(rw http.ResponseWriter, r *http.Request) {
return
}
}

// @Summary Debug Websocket
// @ID debug-info-websocket-test
// @Security CoderSessionToken
// @Produce json
// @Tags Debug
// @Success 201 {object} codersdk.Response
// @Router /debug/ws [get]
// @x-apidocgen {"skip": true}
//
// For some reason the swagger docs need to be attached to a function.
//
//nolint:unused
func _debugws(http.ResponseWriter, *http.Request) {}