Versions in this module Expand all Collapse all v1 v1.0.1 Jun 9, 2021 v1.0.0 Jun 9, 2021 Changes in this version + type DRWMutex struct + Names []string + func NewDRWMutex(clnt *Dsync, names ...string) *DRWMutex + func (dm *DRWMutex) GetLock(ctx context.Context, cancel context.CancelFunc, id, source string, ...) (locked bool) + func (dm *DRWMutex) GetRLock(ctx context.Context, cancel context.CancelFunc, id, source string, ...) (locked bool) + func (dm *DRWMutex) Lock(id, source string) + func (dm *DRWMutex) RLock(id, source string) + func (dm *DRWMutex) RUnlock() + func (dm *DRWMutex) Unlock() + type Dsync struct + GetLockers func() ([]NetLocker, string) + type Granted struct + type LockArgs struct + Owner string + Quorum int + Resources []string + Source string + UID string + type NetLocker interface + Close func() error + ForceUnlock func(ctx context.Context, args LockArgs) (bool, error) + IsLocal func() bool + IsOnline func() bool + Lock func(ctx context.Context, args LockArgs) (bool, error) + RLock func(ctx context.Context, args LockArgs) (bool, error) + RUnlock func(ctx context.Context, args LockArgs) (bool, error) + Refresh func(ctx context.Context, args LockArgs) (bool, error) + String func() string + Unlock func(ctx context.Context, args LockArgs) (bool, error) + type Options struct + Timeout time.Duration