# Functions
GetConfig returns a full config, containing any value provided by configOverrides, and the default values otherwise.
New creates a new mongoDB lock for the provided session, db, collection and resource.
NewUsages returns a new Usages struct with the provided config and a new map and mutex.
# Constants
AcquireRetryLogThreshold is the period of time after which an acquire retry will be logged.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
Default config values.
No description provided by the author
UnlockRetryLogThreshold is the period of time after which an unlock retry will be logged.
# Variables
ErrAcquireTimeout is an error returned when acquire fails after retrying to lock a resource for a period of time greater or equal than 'AcquireRetryTimeout'.
ErrMongoDbClosing is an error returned because MongoDB is being closed.
ErrUnlockTimeout is an error logged when unlock fails after retrying to unlock a resource for a period of time greater or equal than 'UnlockRetryTimeout'.
GenerateTimeID returns the current timestamp in nanoseconds.
No description provided by the author
# Structs
Config is a lock configuration.
ConfigOverride is a config with pointer values, which are used to override values (it not nil).
Lock is a MongoDB lock for a resource.
Usage keeps track of locks that have been acquired by a particular caller and resource.
Usages is a 2D map to keep track of lock usages by resourceID and unique caller names.