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

Method upsertAgentLocked

tailnet/controllers.go:1388–1395  ·  view source on GitHub ↗
(workspaceID uuid.UUID, a *Agent)

Source from the content-addressed store, hash-verified

1386}
1387
1388func (t *tunnelUpdater) upsertAgentLocked(workspaceID uuid.UUID, a *Agent) error {
1389 w, ok := t.workspaces[workspaceID]
1390 if !ok {
1391 return xerrors.Errorf("workspace %s not found", workspaceID)
1392 }
1393 w.agents[a.ID] = a
1394 return nil
1395}
1396
1397func (t *tunnelUpdater) deleteAgentLocked(workspaceID, id uuid.UUID) (*Agent, error) {
1398 w, ok := t.workspaces[workspaceID]

Callers 1

handleUpdateMethod · 0.95

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected