MCPcopy
hub / github.com/caddyserver/certmagic / acquireLock

Function acquireLock

storage.go:308–316  ·  view source on GitHub ↗
(ctx context.Context, storage Storage, lockKey string)

Source from the content-addressed store, hash-verified

306}
307
308func acquireLock(ctx context.Context, storage Storage, lockKey string) error {
309 err := storage.Lock(ctx, lockKey)
310 if err == nil {
311 locksMu.Lock()
312 locks[lockKey] = storage
313 locksMu.Unlock()
314 }
315 return err
316}
317
318func tryAcquireLock(ctx context.Context, storage Storage, lockKey string) (bool, error) {
319 locker, ok := storage.(TryLocker)

Callers 5

updateARIMethod · 0.85
CleanStorageFunction · 0.85
obtainCertMethod · 0.85
renewCertMethod · 0.85

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…