Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
type Mutex struct {
// contains filtered or unexported fields
}
func (*Mutex) Lock ¶
Lock blocks until the lock can be acquired. The function intelligently waits for either the lease duration to expire or a pub sub notification that the lock has been released before attempting to acquire the lock.
type Option ¶
type Option func(*Options)
func WithLeaseDuration ¶
WithLeaseDuration specifies the TTL on the underlying Redis map entry. Practically speaking, this is the upper bound on how long a lock will appear to be held when its owner abandons it.
func WithLogger ¶
WithLogger allows a pluggable logger implementation.
Click to show internal directories.
Click to hide internal directories.