Documentation ¶
Index ¶
Constants ¶
View Source
const ErrRedisNotFound = redis.Nil
ErrRedisNotFound not exist in redis
Variables ¶
View Source
var RedisClient *redis.Client
RedisClient redis 客户端
Functions ¶
Types ¶
type Config ¶
type Config struct { Addr string Password string DB int MaxRetries int MinIdleConn int DialTimeout time.Duration ReadTimeout time.Duration WriteTimeout time.Duration PoolSize int PoolTimeout time.Duration IsTrace bool }
Config redis config
type IDAlloc ¶
type IDAlloc struct {
// contains filtered or unexported fields
}
func NewIDAlloc ¶
func NewIDAlloc(conn *redis.Client) *IDAlloc
NewIDAlloc create new id alloc instance
Click to show internal directories.
Click to hide internal directories.