Documentation
¶
Overview ¶
Package lock provides per-game-install exclusive locking for apply and unapply operations. It uses flock(2) to prevent concurrent modifications to the same game directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GameInstall ¶
GameInstall acquires an exclusive non-blocking flock on a lockfile for the given game install ID. It returns an unlock function that must be called when the operation is complete.
If another process already holds the lock, an error is returned immediately rather than blocking. The lock is also released automatically by the OS if the process exits or crashes.
locksDir should be a stable per-installation directory, e.g. $XDG_STATE_HOME/modctl/locks.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.