MCPcopy
hub / github.com/loft-sh/devpod / Lock

Method Lock

pkg/client/clientimplementation/proxy_client.go:55–67  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

53}
54
55func (s *proxyClient) Lock(ctx context.Context) error {
56 s.initLock()
57
58 // try to lock workspace
59 s.log.Debugf("Acquire workspace lock...")
60 err := tryLock(ctx, s.workspaceLock, "workspace", s.log)
61 if err != nil {
62 return fmt.Errorf("error locking workspace: %w", err)
63 }
64 s.log.Debugf("Acquired workspace lock...")
65
66 return nil
67}
68
69func (s *proxyClient) Unlock() {
70 s.initLock()

Callers

nothing calls this directly

Calls 4

initLockMethod · 0.95
tryLockFunction · 0.85
DebugfMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected