Documentation ¶
Index ¶
- func ExpectLockUnlock(fileLockerMock *FileLockerMock, lockPath string, ownerId string)
- func GetOwnerIdForProcess() string
- func LockFile(lockPath string, ownerId string, timeoutSeconds int) (locked bool, err error)
- func UnlockFile(lockPath string, ownerId string) (hadLock bool, err error)
- type FileLocker
- type FileLockerMock
- type FileLockerNoop
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectLockUnlock ¶
func ExpectLockUnlock(fileLockerMock *FileLockerMock, lockPath string, ownerId string)
func GetOwnerIdForProcess ¶
func GetOwnerIdForProcess() string
Types ¶
type FileLocker ¶
type FileLocker interface { Lock(lockPath string, ownerId string, timeoutSeconds int) (locked bool, err error) Unlock(lockPath string, ownerId string) (hadLock bool, err error) }
func NewFileLocker ¶
func NewFileLocker() FileLocker
type FileLockerMock ¶
Click to show internal directories.
Click to hide internal directories.