Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributedLockOptions ¶
type DistributedLockStub ¶
type DistributedLockStub struct { Owner string // contains filtered or unexported fields }
This is a simple object which holds by the real lock. Add more contextual information if needed.
type DistributedLocker ¶
type DistributedLocker interface { TryGetLock() error Close() }
func NewDistributedLock ¶
func NewDistributedLock(option DistributedLockOptions) (DistributedLocker, error)
Immediately create a new distributed lock instance when there is no any instance with the same Key being created before.
Click to show internal directories.
Click to hide internal directories.