Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockManager ¶
type LockManager struct {
// contains filtered or unexported fields
}
LockManager manages file locks across multiple agents
func (*LockManager) Acquire ¶
func (m *LockManager) Acquire(path, ownerID string, timeout time.Duration) error
Acquire attempts to acquire a lock on a file Blocks until lock is available or timeout is reached
func (*LockManager) ForceRelease ¶
func (m *LockManager) ForceRelease(path string) error
ForceRelease forcibly releases a lock on a file Used for cleanup when an agent crashes
func (*LockManager) IsLocked ¶
func (m *LockManager) IsLocked(path string) bool
IsLocked checks if a file is currently locked
func (*LockManager) Release ¶
func (m *LockManager) Release(path, ownerID string) error
Release releases a lock on a file Returns error if lock is not held by the specified owner
func (*LockManager) ReleaseAll ¶
func (m *LockManager) ReleaseAll(ownerID string) error
ReleaseAll releases all locks held by a specific owner Used when an agent shuts down
Click to show internal directories.
Click to hide internal directories.