Documentation
¶
Index ¶
- Constants
- func Del(keys ...string)
- func Expire(key string, seconds int64)
- func Get(key string) []byte
- func GetSet(key string, content interface{}) []byte
- func Incr(key string) int64
- func LLen(key string) int64
- func LPopCount(key string, count int) [][]byte
- func LPush(key string, content interface{})
- func LRange(key string, start, end int64) [][]byte
- func Leaky() *redis.Client
- func Lpop(key string) []byte
- func NewRedsync() *redsync.Redsync
- func RPopCount(key string, count int) [][]byte
- func RPush(key string, content interface{})
- func Rpop(key string) []byte
- func Rpush(key string, value interface{}) int64
- func Set(key string, content interface{})
- func SetNxTimed(key string, content interface{}, expiry time.Duration) (didSet bool)
- func SetTimed(key string, seconds uint64, content interface{})
- func SetTimedIfSet(name string, value interface{}) (set bool)
- func ZAdd(key string, content *redis.Z)
- func ZAddSelfScore(key string, content float64)
- func ZExists(key, member string) bool
- func ZPeep(key string) (string, bool)
- func ZRem(key, member string)
- func ZRemRangeByRank(key string, start, stop int64)
- func ZScore(key, member string) float64
Constants ¶
View Source
const ( // EnvRedisAddr to use when connecting to Redis EnvRedisAddr = `FLU_REDIS_ADDR` // EnvRedisPassword to use when authenticating to the Redis server EnvRedisPassword = `FLU_REDIS_PASSWORD` // Context to use when writing logging messages Context = `REDIS` )
Variables ¶
This section is empty.
Functions ¶
func NewRedsync ¶
func NewRedsync() *redsync.Redsync
returns a redsync distributed mutex on top of redis client
func Set ¶
func Set(key string, content interface{})
Set state to the key containing the JSON-encoded content
func SetNxTimed ¶
SetNxTimed, returning didSet as true if the value was set (didn't exist already!)
func SetTimed ¶
SetTimed state to the key containing JSON-encoded content, deleting after the time period defined as a constant in state.
func SetTimedIfSet ¶
SetTimed attempts to set a cookie with the JSON of value if the key is already set and not empty.
func ZAddSelfScore ¶
func ZPeep ¶
ZPeep looks at the first member of a sorted set without popping it returning it and a boolean of whether there was an element or not
func ZRemRangeByRank ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.