Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedisConcurrentLockInTime ¶
func RedisConcurrentLockInTime(ctx context.Context, client RedisClientIOCInterface, lockKey string, lockTime time.Duration) (holdLock bool, err error)
RedisConcurrentLockInTime 获取redis并发锁,固定时间内禁止重发
Types ¶
type RedisClient ¶
func GetRedisClientSingleton ¶
func GetRedisClientSingleton() (*RedisClient, error)
func (*RedisClient) Create ¶
func (r *RedisClient) Create(addr, password string, db uint8) (bool, error)
func (*RedisClient) GetClient ¶
func (r *RedisClient) GetClient() *redis.Client
type RedisClientIOCInterface ¶
type RedisClientIOCInterface interface { Create(addr, password string, db uint8) (bool, error) GetClient() *v9.Client }
func GetRedisClientIOCInterfaceSingleton ¶
func GetRedisClientIOCInterfaceSingleton() (RedisClientIOCInterface, error)
type ThisRedisClient ¶
type ThisRedisClient struct { }
func (*ThisRedisClient) This ¶
func (t *ThisRedisClient) This() RedisClientIOCInterface
Click to show internal directories.
Click to hide internal directories.