Documentation
¶
Index ¶
- Constants
- func DecrBy(key string, n int64) int64
- func Del(ks ...string) (int64, error)
- func Exists(key string) bool
- func Expire(k string, t int64) bool
- func Get(key string) []byte
- func GetString(key string) string
- func HGet(k, i string) (string, error)
- func HGetAll(k string) (map[string]string, error)
- func HMSet(k string, fields map[string]interface{}, timeoutSecond int) error
- func HMget(k string, is ...string) ([]interface{}, error)
- func Hdel(k string, is ...string) (int64, error)
- func Hset(k, i, v string, timeoutSecond int) error
- func Incr(key string) int64
- func IncrBy(key string, n int64) int64
- func Init()
- func Lock(k, uniqueValue string, timeoutSecond int) bool
- func LockWait(k, uniqueValue string, timeoutSecond int, lockTimeoutSecond int) bool
- func Set(k, v string) error
- func SetNx(k, v string, timeoutSecond int) error
- func SwitchOpen(key string) bool
- func TestLog()
- func Unlock(k, uniqueValue string) bool
- func ZAdd(k, v string, score float64) (interface{}, error)
- func ZCard(k string) (interface{}, error)
- func ZRank(k, v string) (interface{}, error)
- func ZRem(k, v string) (interface{}, error)
- func ZRemRangeByScore(k string, min, max string) (interface{}, error)
Constants ¶
View Source
const (
ES日志开关 = "es:log:switch:"
)
Variables ¶
This section is empty.
Functions ¶
func LockWait ¶
LockWait 抢锁,在规定的时间内直到抢锁成功或者超时失败。抢到锁返回true,否则false k 必须 uniqueValue 必须 timeoutSecond 锁自动释放时间,必须 lockTimeoutSecond 抢锁超时时间,默认1分钟
func ZRemRangeByScore ¶ added in v0.0.11
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.