File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,21 @@ type UserKeyPrefixBound = sstable.UserKeyPrefixBound
76
76
// IterKeyType configures which types of keys an iterator should surface.
77
77
type IterKeyType int8
78
78
79
+ // DirLock represents a file lock on a directory. It may be passed to Open through
80
+ // Options.Lock to elide lock aquisition during Open.
81
+ type DirLock = base.DirLock
82
+
83
+ // LockDirectory acquires the directory lock in the named directory, preventing
84
+ // another process from opening the database. LockDirectory returns a
85
+ // handle to the held lock that may be passed to Open, skipping lock acquisition
86
+ // during Open.
87
+ //
88
+ // LockDirectory may be used to expand the critical section protected by the
89
+ // database lock to include setup before the call to Open.
90
+ func LockDirectory (dirname string , fs vfs.FS ) (* DirLock , error ) {
91
+ return base .LockDirectory (dirname , fs )
92
+ }
93
+
79
94
const (
80
95
// IterKeyTypePointsOnly configures an iterator to iterate over point keys
81
96
// only.
You can’t perform that action at this time.
0 commit comments