flock

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncDir

func SyncDir(path string) error

SyncDir commits the current contents of the directory to stable storage.

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.

func (*FileLockGuard) Release

func (fl *FileLockGuard) Release() error

Release releases the file lock.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL