Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
T wraps flock and dumps JSON data in the lock file hinting about what holds the lock.
func (*T) Lock ¶
Lock acquires an exclusive file lock on the file and writes a JSON formatted structure hinting who holds the lock and with what intention.
func (*T) Probe ¶ added in v1.1.0
Probe attempts to acquire a file lock. If successful, it releases the lock and returns an empty Meta. If the lock is already held by another process, it reads and returns the current lock metadata. Note: Reading the metadata may fail if the other process has not finished writing it.
Click to show internal directories.
Click to hide internal directories.