Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultExpiry = 1 * time.Second
DefaultExpiry signifies the default expiration for an acquired lock
Variables ¶
View Source
var ( // ErrNotObtained is returned when a lock cannot be obtained. ErrNotObtained = redislock.ErrNotObtained // ErrNotHeld is returned when trying to release an inactive lock. ErrNotHeld = redislock.ErrLockNotHeld )
Functions ¶
This section is empty.
Types ¶
type RedisLocker ¶
type RedisLocker struct {
// contains filtered or unexported fields
}
RedisLocker implements the Locker interface for Redis
func NewRedisLocker ¶
func NewRedisLocker(c redislock.RedisClient) *RedisLocker
NewRedisLocker creates a Locker implementation for Redis
type RedisUnlocker ¶
type RedisUnlocker struct {
// contains filtered or unexported fields
}
RedisUnlocker implements the Unlocker interface for Redis
Click to show internal directories.
Click to hide internal directories.