Documentation
¶
Overview ¶
Package lockfile provides directory-based locking to prevent multiple PromptPipe instances.
This package implements a robust file locking mechanism using syscall-level locks that are automatically released when the process exits (gracefully or not).
Index ¶
Constants ¶
View Source
const LockFileName = "promptpipe.lock"
LockFileName is the name of the lock file created in the state directory
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents an active directory lock
func AcquireLock ¶
AcquireLock attempts to acquire an exclusive lock on the state directory. Returns a Lock instance if successful, or an error with detailed information about the conflicting process if the lock is already held.
Click to show internal directories.
Click to hide internal directories.