Versions in this module Expand all Collapse all v0 v0.1.0 Nov 22, 2021 Changes in this version + const DefaultRedisName + const ErrRedisNotFound + const PrefixCheckRepeat + const RepeatDefaultTimeout + var RedisClient *redis.Client + func Init() + func InitTestRedis() + type CheckRepeat interface + Del func(keys string) int64 + Get func(key string) (string, error) + Set func(key string, value interface{}, expiration time.Duration) error + SetNX func(key string, value interface{}, expiration time.Duration) (bool, error) + func NewCheckRepeat(client *redis.Client) CheckRepeat + type Config struct + Addr string + DB int + DialTimeout time.Duration + EnableTrace bool + MinIdleConn int + Password string + PoolSize int + PoolTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + type IDAlloc struct + func NewIDAlloc(conn *redis.Client) *IDAlloc + func (ia *IDAlloc) GetCurrentID(key string) (int64, error) + func (ia *IDAlloc) GetKey(key string) string + func (ia *IDAlloc) GetNewID(key string, step int64) (int64, error) + type RedisManager struct + func NewRedisManager() *RedisManager + func (r *RedisManager) GetClient(name string) (*redis.Client, error)