# Packages
No description provided by the author
# Functions
New creates a new mongoDB lock for the provided session, db, collection and resource.
# Constants
PurgerPeriod is the time period between expired lock purges.
TTL is the 'time to live' for a lock in number of seconds.
# Variables
AcquireMaxRetries is the maximum number of locking retries by the Acquire lock, discounting the first attempt.
AcquirePeriod is the time period between acquire lock retries.
ErrAcquireMaxRetries is an error returned when acquire fails after retrying to lock a resource 'AcquireMaxRetries' times.
ErrMongoDbClosing is an error returned because MongoDB is being closed.
ErrUnlockMaxRetries is an error logged when unlock fails after retrying to unlock a resource 'UnlockMaxRetries' times.
GenerateTimeID returns the current timestamp in nanoseconds.
UnlockMaxRetries is the maximum number of unlocking retries by the Unlock lock, discounting the first attempt.
UnlockPeriod is the time period between Unlock lock retries.