Documentation
¶
Overview ¶
Package ownerlock makes one process the owner of a data directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAnotherOwner = errors.New("another process owns the data directory")
ErrAnotherOwner: another process holds the data directory's lock.
Functions ¶
func Acquire ¶
Acquire creates dataDir (0700) and takes an exclusive, non-blocking lock on <dataDir>/godwit.lock; it fails with ErrAnotherOwner if someone holds it. On Unix the directory must belong to the current user and is tightened to 0700; on Windows it relies on the user directory's default ACL, and the ACL of a custom data directory is not checked. The lock is released by release or when the process exits, however it exits.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.