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

Method upsertWorkspaceLocked

tailnet/controllers.go:1367–1377  ·  view source on GitHub ↗
(w *Workspace)

Source from the content-addressed store, hash-verified

1365}
1366
1367func (t *tunnelUpdater) upsertWorkspaceLocked(w *Workspace) *Workspace {
1368 old, ok := t.workspaces[w.ID]
1369 if !ok {
1370 t.workspaces[w.ID] = w
1371 return w
1372 }
1373 old.Name = w.Name
1374 old.Status = w.Status
1375 old.ownerUsername = w.ownerUsername
1376 return w
1377}
1378
1379func (t *tunnelUpdater) deleteWorkspaceLocked(id uuid.UUID) (*Workspace, error) {
1380 w, ok := t.workspaces[id]

Callers 1

handleUpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected