Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
A Mutex is a mutual exclusion lock. Mutexes can be created as part of other structures.
func (*Mutex) Lock ¶
func (m *Mutex) Lock()
Lock will write an item in a DynamoDB table if the item does not exist. Before writing the lock, we will clear any locks that are expired. Calling this function will block until a lock can be acquired.
func (*Mutex) PruneExpired ¶
func (m *Mutex) PruneExpired()
PruneExpired delete all locks that have lived past their TTL. This is to prevent deadlock from processes that have taken locks but never removed them after execution. This commonly happens when a processor experiences network failure.
Click to show internal directories.
Click to hide internal directories.