Documentation
¶
Index ¶
Constants ¶
View Source
const ( // LockTimeout is the expiration of a redis lock // if any operation is longer than this, it should // refresh the lock LockTimeout = 15 * time.Second // WaitTimeout maximum time to wait before returning control to caller. WaitTimeout = 2 * time.Minute // WaitRetry time to wait between retries WaitRetry = 100 * time.Millisecond )
Variables ¶
View Source
var ( // ErrTooManyRetries is the error returned when despite several tries // we never managed to get a lock ErrTooManyRetries = errors.New("too many retry") )
Functions ¶
This section is empty.
Types ¶
type ErrorLocker ¶
type ErrorLocker interface { Lock() error Unlock() }
An ErrorLocker is a locker which can fail (returns an error)
type ErrorRWLocker ¶
type ErrorRWLocker interface { ErrorLocker RLock() error RUnlock() }
ErrorRWLocker is the interface for a RWLock as inspired by RWMutex
Click to show internal directories.
Click to hide internal directories.