Versions in this module Expand all Collapse all v0 v0.39.1 Apr 2, 2024 v0.39.0 Apr 1, 2024 Changes in this version + var ErrExtendFailed = errors.New("redis: failed to extend lock") + type DelayFunc func(tries int) time.Duration + type Lock struct + func (m *Lock) Lock(ctx context.Context) (context.Context, error) + func (m *Lock) Unlock(ctx context.Context) error + func (m *Lock) WaitForLock(ctx context.Context) (context.Context, error) + func (m *Lock) WaitForUnlock(ctx context.Context) error + type Pool struct + func NewPool(addresses string) *Pool + func (p *Pool) DoAsync(actFn func(*redis.Client) (bool, error)) (int, error) + func (p *Pool) DoUntilQuorumAsync(quorum int, actFn func(*redis.Client) (bool, error)) (int, error) + func (p *Pool) NewLock(name string, options ...RedisOption) *Lock + type RedisOption func(*Lock) + func WithDriftFactor(factor float64) RedisOption + func WithExpiry(expiry time.Duration) RedisOption