Documentation ¶
Overview ¶
redisclient
Index ¶
- type RedisClient
- func (rc *RedisClient) BRPop(key string) (string, error)
- func (rc *RedisClient) DECR(key string) (int, error)
- func (rc *RedisClient) Del(key string) (int64, error)
- func (rc *RedisClient) Exists(key string) (bool, error)
- func (rc *RedisClient) Expire(key string, timeOutSeconds int64) (int64, error)
- func (rc *RedisClient) FlushDB()
- func (rc *RedisClient) Get(key string) (string, error)
- func (rc *RedisClient) GetObj(key string) (interface{}, error)
- func (rc *RedisClient) HGet(hashID string, field string) (string, error)
- func (rc *RedisClient) HGetAll(hashID string) (map[string]string, error)
- func (rc *RedisClient) HSet(hashID string, field string, val string) error
- func (rc *RedisClient) INCR(key string) (int, error)
- func (rc *RedisClient) LPush(key string, val string) (int64, error)
- func (rc *RedisClient) Set(key string, val interface{}) (interface{}, error)
- func (rc *RedisClient) SetWithExpire(key string, val interface{}, timeOutSeconds int64) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient struct { Address string // contains filtered or unexported fields }
func (*RedisClient) BRPop ¶
func (rc *RedisClient) BRPop(key string) (string, error)
删除,并获得该列表中的最后一个元素,或阻塞,直到有一个可用
func (*RedisClient) DECR ¶
func (rc *RedisClient) DECR(key string) (int, error)
对存储在指定key的数值执行原子的减1操作
func (*RedisClient) Expire ¶
func (rc *RedisClient) Expire(key string, timeOutSeconds int64) (int64, error)
设置指定key的过期时间
func (*RedisClient) GetObj ¶
func (rc *RedisClient) GetObj(key string) (interface{}, error)
获取指定key的内容, interface{}
func (*RedisClient) HGet ¶
func (rc *RedisClient) HGet(hashID string, field string) (string, error)
获取指定hashset的内容
func (*RedisClient) HGetAll ¶
func (rc *RedisClient) HGetAll(hashID string) (map[string]string, error)
获取指定hashset的所有内容
func (*RedisClient) HSet ¶
func (rc *RedisClient) HSet(hashID string, field string, val string) error
设置指定hashset的内容
func (*RedisClient) INCR ¶
func (rc *RedisClient) INCR(key string) (int, error)
对存储在指定key的数值执行原子的加1操作
func (*RedisClient) LPush ¶
func (rc *RedisClient) LPush(key string, val string) (int64, error)
将所有指定的值插入到存于 key 的列表的头部
func (*RedisClient) Set ¶
func (rc *RedisClient) Set(key string, val interface{}) (interface{}, error)
func (*RedisClient) SetWithExpire ¶
func (rc *RedisClient) SetWithExpire(key string, val interface{}, timeOutSeconds int64) (interface{}, error)
设置指定key的内容
Click to show internal directories.
Click to hide internal directories.