The highest tagged major version is
v2.
package
Version:
v1.18.0
Opens a new window with list of versions in this module.
Published: Aug 11, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
ErrNotInit = errors.New("klock not init")
ErrCreateLockTimeout = errors.New("create lock timeout")
ErrCreateLockMaxRetry = errors.New("create lock reached max attempts")
ErrUnlockMaxRetry = errors.New("unlock reached max attempts")
ErrLockExist = errors.New("lock exist")
)
Lock will block until the lock is acquired
TryLock will try to acquire the lock, if the lock is already acquired, it will return ErrLockExist
Timeout is set to 3 seconds
Source Files
¶
Click to show internal directories.
Click to hide internal directories.