Versions in this module Expand all Collapse all v4 v4.0.0 Jan 7, 2020 Changes in this version + type ErrAlreadyLocked struct + func (e *ErrAlreadyLocked) Error() string + type EtcdLock struct + func (l *EtcdLock) Release() error + type EtcdLocker struct + func (locker *EtcdLocker) Acquire(key string, ttl int) (Lock, error) + func (locker *EtcdLocker) Wait(key string) error + func (locker *EtcdLocker) WaitAcquire(key string, ttl int) (Lock, error) + type EtcdLockerOpt func(locker *EtcdLocker) + func WithCooldownTryLockDuration(timeout time.Duration) EtcdLockerOpt + func WithMaxTryLockTimeout(timeout time.Duration) EtcdLockerOpt + func WithTryLockTimeout(timeout time.Duration) EtcdLockerOpt + type Lock interface + Release func() error + type Locker interface + Acquire func(key string, ttl int) (Lock, error) + Wait func(key string) error + WaitAcquire func(key string, ttl int) (Lock, error) + func NewEtcdLocker(client *etcd.Client, opts ...EtcdLockerOpt) Locker Other modules containing this package gopkg.in/appsdeck/go-etcd-lock.v1 gopkg.in/appsdeck/go-etcd-lock.v2 gopkg.in/appsdeck/go-etcd-lock.v3