Documentation ¶
Overview ¶
Package lockfile implements a pid lock file mechanism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lockfile ¶
type Lockfile string
Lockfile is a pid file which can be locked.
func New ¶
New returns a new Lockfile instance. Arg fp must be an absolute path (but it's legal for the path to not exist).
func (Lockfile) Lock ¶
Lock attempts to acquire the lock, retrying if necessary, until the timeout expires. If timeout is zero, retry will not occur. On success, nil is returned. An error is returned if the lock cannot be acquired for any reason.
Click to show internal directories.
Click to hide internal directories.