Documentation ¶
Overview ¶
Package filelock provides the resources required to create a file lock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLock ¶
type FileLock struct {
// contains filtered or unexported fields
}
FileLock represents a lock for a key stored as a single file.
func (*FileLock) NewLock ¶
NewLock creates a new FileLock instance using an existing FileLock instance.
type Options ¶
type Options struct { // The amount of time (in seconds) that the owner has this lock for. // If lease_duration is None then the lock is non-expirable. TTL time.Duration // Block=true sets the behavior of TryLock() to blocking, if Block=false TryLock() will // be non-blocking and will return false if the lock is currently held by a different client Block bool DeleteOnRelease bool }
Options contains settings that can be adjusted to change the behavior of a file lock.
Click to show internal directories.
Click to hide internal directories.