(ctx context.Context, storage Storage, lockKey string)
| 306 | } |
| 307 | |
| 308 | func 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 | |
| 318 | func tryAcquireLock(ctx context.Context, storage Storage, lockKey string) (bool, error) { |
| 319 | locker, ok := storage.(TryLocker) |
no test coverage detected
searching dependent graphs…