MCPcopy Index your code
hub / github.com/coder/coder / WorkspaceAgent

Function WorkspaceAgent

coderd/httpmw/workspaceagent.go:27–33  ·  view source on GitHub ↗

WorkspaceAgent returns the workspace agent from the ExtractAgent handler.

(r *http.Request)

Source from the content-addressed store, hash-verified

25
26// WorkspaceAgent returns the workspace agent from the ExtractAgent handler.
27func WorkspaceAgent(r *http.Request) database.WorkspaceAgent {
28 user, ok := WorkspaceAgentOptional(r)
29 if !ok {
30 panic("developer error: agent middleware not provided or was made optional")
31 }
32 return user
33}
34
35type latestBuildContextKey struct{}
36

Callers 11

workspaceAgentReinitMethod · 0.92
agentGitSSHKeyMethod · 0.92
workspaceAgentRPCMethod · 0.92
TestWorkspaceAgentFunction · 0.92
setupFunction · 0.92

Calls 1

WorkspaceAgentOptionalFunction · 0.85

Tested by 2

TestWorkspaceAgentFunction · 0.74
setupFunction · 0.74