Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileLockGuard ¶
type FileLockGuard struct {
// contains filtered or unexported fields
}
FileLockGuard holds a lock of file on a directory.
func AcquireFileLock ¶
func AcquireFileLock(path string, readOnly bool) (*FileLockGuard, error)
AcquireFileLock acquire the lock on the directory by syscall.Flock. Return a FileLockGuard or an error, if any.
func (*FileLockGuard) Release ¶
func (fl *FileLockGuard) Release() error
Release release the file lock.
Click to show internal directories.
Click to hide internal directories.