Documentation ¶
Index ¶
- type RedisClient
- func (r *RedisClient) Close()
- func (r *RedisClient) DEL(key string) (int, error)
- func (r *RedisClient) EXPIRE(key string, sec int64) (int64, error)
- func (r *RedisClient) GET(key string) (string, error)
- func (r *RedisClient) HGET(key string, field string) (string, error)
- func (r *RedisClient) HGETALL(key string) (map[string]string, error)
- func (r *RedisClient) HSET(key string, field string, value string) (int64, error)
- func (r *RedisClient) KEYS(patten string) ([]string, error)
- func (r *RedisClient) NewPool(opts config.RedisConnOpt)
- func (r *RedisClient) SET(key string, value string) (int64, error)
- func (r *RedisClient) SETEX(key string, sec int, value string) (int64, error)
- func (r *RedisClient) Start()
- func (r *RedisClient) Write(data StoreData)
- func (r *RedisClient) WriteHash(key string, value map[string]string)
- func (r *RedisClient) Writes(data []StoreData)
- type StoreData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
RedisClient Redis客户端
func (*RedisClient) EXPIRE ¶
func (r *RedisClient) EXPIRE(key string, sec int64) (int64, error)
EXPIRE 设置key的过期时间
func (*RedisClient) HGET ¶
func (r *RedisClient) HGET(key string, field string) (string, error)
HGET 获取hash中key对应的field的数据
func (*RedisClient) HGETALL ¶
func (r *RedisClient) HGETALL(key string) (map[string]string, error)
HGETALL 获取key对应的hash数据
func (*RedisClient) KEYS ¶
func (r *RedisClient) KEYS(patten string) ([]string, error)
KEYS 检索规则匹配的key
func (*RedisClient) NewPool ¶
func (r *RedisClient) NewPool(opts config.RedisConnOpt)
NewPool 新建Redis线程池
func (*RedisClient) SET ¶
func (r *RedisClient) SET(key string, value string) (int64, error)
SET 设置key对应的数据
Click to show internal directories.
Click to hide internal directories.