Documentation ¶
Index ¶
- func BLPop(timeout time.Duration, keys ...string) ([]string, error)
- func BRPop(timeout time.Duration, keys ...string) ([]string, error)
- func BRPopLPush(source string, destination string, timeout time.Duration) (string, error)
- func Decr(key string) (int64, error)
- func DecrBy(key string, decrement int64) (int64, error)
- func Del(keys ...string) error
- func Engine() *redis.Client
- func Exists(keys ...string) (int64, error)
- func Get(key string) (result string, err error)
- func GetSet(key string, value interface{}) (result string, err error)
- func Incr(key string) (int64, error)
- func IncrBy(key string, value int64) (int64, error)
- func IncrByFloat(key string, value float64) (float64, error)
- func LIndex(key string, index int64) (string, error)
- func LInsert(key string, op string, pivot interface{}, value interface{}) error
- func LLen(key string) (int64, error)
- func LPop(key string) (string, error)
- func LPush(key string, values ...interface{}) error
- func LPushX(key string, value interface{}) error
- func LRange(key string, start int64, stop int64) ([]string, error)
- func LRem(key string, count int64, value interface{}) error
- func LSet(key string, index int64, value interface{}) error
- func LTrim(key string, start int64, stop int64) error
- func Ping() (string, error)
- func RPop(key string) (string, error)
- func RPopLPush(source string, destination string) (string, error)
- func RPush(key string, values ...interface{}) error
- func RPushX(key string, value interface{}) error
- func Set(key string, value interface{}, expiration time.Duration) error
- func SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
- func TTL(key string) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BRPopLPush ¶
从source列表中弹出一个值,将弹出的元素插入到destination列表中并返回它; 如果列表没有元素会阻塞列表直到等待超时或发现可弹出元素为止。
func IncrByFloat ¶
对key的value值增量加指定值(浮点型,返回增量后的值)
func LRem ¶
* 移除列表元素 * * count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count * count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值 * count = 0 : 移除表中所有与 value 相等的值。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.