MCPcopy Index your code
hub / github.com/docker/docker-agent / LockPathForDatabase

Function LockPathForDatabase

pkg/memory/database/lock.go:67–69  ·  view source on GitHub ↗

LockPathForDatabase returns the companion lock-file path for a memory DB.

(dbPath string)

Source from the content-addressed store, hash-verified

65
66// LockPathForDatabase returns the companion lock-file path for a memory DB.
67func LockPathForDatabase(dbPath string) string {
68 return filepath.Join(filepath.Dir(dbPath), "memory.lock")
69}
70
71// Lock blocks until the exclusive advisory lock is acquired or ctx is canceled.
72func (l *FileLock) Lock(ctx context.Context) error {

Callers 2

NewMemoryDatabaseFunction · 0.92

Calls 1

DirMethod · 0.80

Tested by 1