LockPathForDatabase returns the companion lock-file path for a memory DB.
(dbPath string)
| 65 | |
| 66 | // LockPathForDatabase returns the companion lock-file path for a memory DB. |
| 67 | func 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. |
| 72 | func (l *FileLock) Lock(ctx context.Context) error { |