modulepackage
0.0.0-20210621163534-1f741c230b1f
Repository: https://github.com/kthomas/go-redisutil.git
Documentation: pkg.go.dev
# Functions
Decrement atomically decrements the value for the given key.
Get returns the value for the given key.
Increment atomically increments the value for the given key.
IncrementFloat atomically inrements the value for the given key by the specified float.
RequireRedis reads the environment and initializes the configured redis client or cluster client.
Set sets the value for the given key and ttl.
WithRedlock attempts to executes the given function after acquiring a lock by the given name; returns an error if the lock cannot be acquired or if an error can be propagated from the given function; callers should check the error type to ultimately understand why the error occured since it can be related to lock acquisition or internal callback execution.
# Variables
RedisClient is the redis client.
RedisClusterClient is the redis cluster client.