Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + type DistributedLock struct + func NewDistributedLock(client *redis.Client, key string, ttl time.Duration) *DistributedLock + func (l *DistributedLock) Acquire(ctx context.Context) error + func (l *DistributedLock) Extend(ctx context.Context) error + func (l *DistributedLock) IsHeld(ctx context.Context) (bool, error) + func (l *DistributedLock) Release(ctx context.Context) error + func (l *DistributedLock) TryAcquire(ctx context.Context) (bool, error) + func (l *DistributedLock) TryWithLock(ctx context.Context, fn func(ctx context.Context) error) (bool, error) + func (l *DistributedLock) WithLock(ctx context.Context, fn func(ctx context.Context) error) error