package
1.0.8
Repository: https://github.com/csystem/gcuu.git
Documentation: pkg.go.dev

# README

catredis

全局通用的 Redis 和 Redsync 变量。

用法

Redis 用法如下:

c := catredis.Pool.Get()
defer c.Close()

_, err := c.Do("ZADD", consts.GoldTopRedisKey, -amount, userID)

return err

Redsync 分布式锁的用法如下:

mutex := catredis.RedLock.NewMutex(fmt.Sprintf("%s%d", consts.RedLockCatMovePrefix, userID))
if err := mutex.Lock(); err != nil {
  return err
}
defer mutex.Unlock()

# Functions

No description provided by the author

# Variables

No description provided by the author
No description provided by the author