Documentation ¶
Index ¶
- func ExtendLockExpiration(rc redis.Conn, key string, value string, expiration int) error
- func GrabLock(rc redis.Conn, key string, value string, expiration int) (bool, error)
- func ReleaseLock(rc redis.Conn, key string, value string) error
- func StartMinuteCron(quit chan bool, rp *redis.Pool, name string, cronFunc Function)
- type Function
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendLockExpiration ¶
ExtendLockExpiration extends our lock expiration by the passed in number of seconds
func GrabLock ¶
GrabLock grabs the passed in lock from redis in an atomic operation. It returns whether the lock was available and acquired
func ReleaseLock ¶
ReleaseLock releases the passed in lock, returning any error encountered while doing so. It is not considered an error to release a lock that is no longer present
Types ¶
Click to show internal directories.
Click to hide internal directories.