Versions in this module Expand all Collapse all v0 v0.1.1 Oct 16, 2021 v0.1.0 Oct 16, 2021 Changes in this version + var ErrFailed = errors.New("memsync: failed to acquire lock") + type DelayFunc func(tries int) time.Duration + type Memsync struct + func New(cache *memcache.Client) *Memsync + func (m *Memsync) NewMutex(key string, options ...Option) *Mutex + type Mutex struct + func (m *Mutex) Key() string + func (m *Mutex) Lock() error + func (m *Mutex) Token() string + func (m *Mutex) Unlock() error + func (m *Mutex) Until() time.Time + type Option func(*Mutex) + func WithDriftFactor(factor float64) Option + func WithExpiry(expiry time.Duration) Option + func WithGenTokenFunc(genTokenFunc func() (string, error)) Option + func WithRetryDelay(delay time.Duration) Option + func WithRetryDelayFunc(delayFn DelayFunc) Option + func WithTries(tries int) Option