Versions in this module Expand all Collapse all v0 v0.0.6 Jul 26, 2021 Changes in this version + func SetLogger(l Logger) + type Conn interface + Close func() error + Delete func(ctx context.Context, key, value string) error + Extend func(ctx context.Context, key, value string, expires time.Duration) error + SetNX func(ctx context.Context, key, value string, expires time.Duration) error + type Lock struct + func New(clients ...Conn) *Lock + func (l *Lock) NewMutex(name string, opts ...Option) *Mutex + type Logger interface + Error func(err error) + type MultiError []error + func (m MultiError) Error() string + func (m MultiError) Unwrap() error + type Mutex struct + func NewMutex(name string, opts ...Option) (*Mutex, error) + func (m *Mutex) Exec(ctx context.Context, f WorkerFunc) (err error) + func (m *Mutex) Extend(ctx context.Context) error + func (m *Mutex) LastTime() time.Time + func (m *Mutex) Lock(ctx context.Context) error + func (m *Mutex) Unlock(ctx context.Context) error + type Option func(*Options) + func WithConnections(conns ...Conn) Option + func WithExpires(d time.Duration) Option + func WithRetries(n int) Option + func WithTimeout(d time.Duration) Option + type Options struct + type StdLogger struct + func (l *StdLogger) Error(err error) + type WorkerFunc func(context.Context)