Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendLock ¶
ExtendLock extends our lock expiration by the passed in number of seconds
func GrabLock ¶
func GrabLock(rp *redis.Pool, key string, expiration time.Duration, retry time.Duration) (string, error)
GrabLock grabs the passed in lock from redis in an atomic operation. It returns the lock value if successful. It will retry until the retry period, returning empty string if not acquired in that time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.