Documentation ¶ Index ¶ type Locker func NewLocker(lockFile string, options ...Option) Locker type Option type Options Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Locker ¶ added in v0.0.41 type Locker interface { WithLock(cb func() error) error } func NewLocker ¶ added in v0.0.41 func NewLocker(lockFile string, options ...Option) Locker type Option ¶ added in v0.0.41 type Option func(*Options) type Options ¶ type Options struct { RetryInterval time.Duration // RetryInterval how often to retry lock attempts Timeout time.Duration // Timeout how long to wait for the lock before giving up } Options holds necessary attributes for a file lock with a timeout. Source Files ¶ View all Source files flock.go Click to show internal directories. Click to hide internal directories.