# README
REDIS
一、如何使用锁
......
lock := redis.GetRedisLock(key, time.Duration(5)*time.Second)
err := lock.Lock()
if err != nil {
logs.Fatal(err)
return
}
defer lock.Unlock()
......
# Packages
No description provided by the author
# Functions
Cmd 封装后的redis执行命令.
Decr 自减-1.
Del del命令.
Exec redigo原生执行命令.
Exists 检测KEY是否存在.
Expire expire命令[给key设定一个存活时间(单位为秒)].
ExpireAt expireAt命令[以UNIX时间戳格式设置key的过期时间].
Get get命令.
GetRedisLock 获取REDIS锁.
HGetAll hGetAll命令.
HMSet hMSet命令.
Incr 自增+1.
Keys keys命令.
NewRedis 实例化Redis.
Persist persist命令[移除给定key的过期时间].
Set set命令.
SetEx setEx命令.
Ttl ttl命令.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
Rds Redis.
# Type aliases
No description provided by the author