Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEtcdClient ¶
func NewEtcdMutex ¶
func NewEtcdMutex( lg *slog.Logger, prefix, key string, session *concurrency.Session, opts *lock.LockOptions, ) etcdMutex
Types ¶
type EtcdLock ¶
type EtcdLock struct {
// contains filtered or unexported fields
}
func NewEtcdLock ¶
type EtcdLockManager ¶
type EtcdLockManager struct {
// contains filtered or unexported fields
}
func NewEtcdLockManager ¶
func (*EtcdLockManager) Health ¶
func (e *EtcdLockManager) Health(ctx context.Context) (conditions []string, err error)
func (*EtcdLockManager) NewLock ¶
func (e *EtcdLockManager) NewLock(key string, opts ...lock.LockOption) lock.Lock
!! Cannot reuse *concurrency.Session across multiple locks since it will break liveliness guarantee A locks will share their sessions and therefore keepalives will be sent for all locks, not just a specific lock. In the current implementation sessions are forcibly orphaned when the non-blocking call to unlock is made so we cannot re-use sessions in that case either -- since the session will be orphaned for all locks if the session is re-used.
Click to show internal directories.
Click to hide internal directories.