modulepackage
0.0.1-alpha
Repository: https://github.com/coolbed/go-redlock.git
Documentation: pkg.go.dev
# README
go-redlock
A redis-based distributed lock implemented by Go.
# Functions
New creates and returns a new redis lock.
# Constants
DefaultLockExpire is the default lock expire time.
MaxRefreshRetryTimes is the maximum retry times of auto refresh if the refresh fails continuously.
MinLockExpire is the minimum lock expire time.
# Variables
ErrAlreadyAcquired is returned when try to lock an already acquired lock.
ErrLockExpireTooSmall is returned when creating a lock with expire smaller than 300ms.
ErrLockNotHeld is returned when trying to release an unacquired lock.
ErrLockWithoutName is returned when creating a lock with a empty name.
ErrNotAcquired is returned when a lock cannot be acquired.