Documentation ¶
Overview ¶
Package lock contains the resources required to create a lock.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker interface { // Creates a new lock using an existing lock instance NewLock(key string) (Locker, error) // Releases the lock // Otherwise returns ErrorUnableToUnlock. Unlock() error // Attempts to acquire lock. If successful, returns the true. // Otherwise returns false, ErrorLockNotObtained. TryLock() (bool, error) }
Locker is the abstract interface for providing a lock client that stores data in the lock The data can be used to provide information about the application using the lock including the prior lock client version.
Directories ¶
Path | Synopsis |
---|---|
Package dynamolock contains the resources required a create a DynamoDB lock.
|
Package dynamolock contains the resources required a create a DynamoDB lock. |
Package filelock provides the resources required to create a file lock.
|
Package filelock provides the resources required to create a file lock. |
Package nillock contains the resources required to create a nil lock.
|
Package nillock contains the resources required to create a nil lock. |
Package redislock contains the resources required a create a Redis lock.
|
Package redislock contains the resources required a create a Redis lock. |
Click to show internal directories.
Click to hide internal directories.