Documentation ¶ Index ¶ type Lock type RedisLock func NewRedisLock(redisCli *redis.Client, name string, expiry time.Duration) *RedisLock func (l *RedisLock) Acquire() error func (l *RedisLock) Expiry() time.Duration func (l *RedisLock) ExtendLease() (bool, error) func (l *RedisLock) Release() (bool, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Lock ¶ type Lock interface { Acquire() error Expiry() time.Duration ExtendLease() (bool, error) Release() (bool, error) } type RedisLock ¶ type RedisLock struct { // contains filtered or unexported fields } func NewRedisLock ¶ func NewRedisLock(redisCli *redis.Client, name string, expiry time.Duration) *RedisLock func (*RedisLock) Acquire ¶ func (l *RedisLock) Acquire() error func (*RedisLock) Expiry ¶ func (l *RedisLock) Expiry() time.Duration func (*RedisLock) ExtendLease ¶ func (l *RedisLock) ExtendLease() (bool, error) func (*RedisLock) Release ¶ func (l *RedisLock) Release() (bool, error) Source Files ¶ View all Source files redis.go Click to show internal directories. Click to hide internal directories.