Versions in this module Expand all Collapse all v0 v0.1.0 Jun 21, 2026 Changes in this version + var ErrNotAcquired = errors.New("redislock: lock not acquired") + var ErrNotHeld = errors.New("redislock: lock not held") + type Lock struct + func (lk *Lock) Extend(ctx context.Context, ttl time.Duration) error + func (lk *Lock) Key() string + func (lk *Lock) Token() string + func (lk *Lock) Unlock(ctx context.Context) error + type Locker struct + func New(client redis.UniversalClient, opts ...Option) *Locker + func (l *Locker) Lock(ctx context.Context, key string, ttl time.Duration) (*Lock, error) + func (l *Locker) TryLock(ctx context.Context, key string, ttl time.Duration) (*Lock, error) + type Option func(*config) + func WithRetryInterval(d time.Duration) Option