Versions in this module Expand all Collapse all v3 v3.1.0 Sep 19, 2020 Changes in this version type Mutex + func (m *Mutex) ExtendContext(ctx context.Context) (bool, error) + func (m *Mutex) LockContext(ctx context.Context) error + func (m *Mutex) UnlockContext(ctx context.Context) (bool, error) + func (m *Mutex) ValidContext(ctx context.Context) (bool, error) v3.0.0 Aug 10, 2020 Changes in this version + var ErrFailed = errors.New("redsync: failed to acquire lock") + type DelayFunc func(tries int) time.Duration + type Mutex struct + func (m *Mutex) Extend() (bool, error) + func (m *Mutex) Lock() error + func (m *Mutex) Unlock() (bool, error) + func (m *Mutex) Valid() (bool, error) + type Option interface + Apply func(*Mutex) + func SetDriftFactor(factor float64) Option + func SetExpiry(expiry time.Duration) Option + func SetGenValueFunc(genValueFunc func() (string, error)) Option + func SetRetryDelay(delay time.Duration) Option + func SetRetryDelayFunc(delayFunc DelayFunc) Option + func SetTries(tries int) Option + type OptionFunc func(*Mutex) + func (f OptionFunc) Apply(mutex *Mutex) + type Redsync struct + func New(pools []redis.Pool) *Redsync + func (r *Redsync) NewMutex(name string, options ...Option) *Mutex Other modules containing this package github.com/go-redsync/redsync github.com/go-redsync/redsync/v2 github.com/go-redsync/redsync/v4