Versions in this module Expand all Collapse all v0 v0.1.1 Mar 28, 2022 v0.1.0 Mar 28, 2022 Changes in this version + type Lock interface + Key func() string + Refresh func(ctx context.Context, duration time.Duration) error + Release func(ctx context.Context) error + type Locker interface + Acquire func(ctx context.Context, key string, ttl time.Duration, metadata string) (Lock, error) + type RedisLock struct + func (r *RedisLock) Key() string + func (r *RedisLock) Refresh(ctx context.Context, duration time.Duration) error + func (r *RedisLock) Release(ctx context.Context) error + type RedisLocker struct + func NewRedisLocker(rdb *redis.Client) *RedisLocker + func (rl *RedisLocker) Acquire(ctx context.Context, key string, ttl time.Duration, metadata string) (Lock, error)