Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RedisMap sync.Map
Functions ¶
func NewClient ¶
func NewClient(c *eredis_config.Config) redis.UniversalClient
func NewClusterClient ¶
func NewClusterClient(c *eredis_config.Config) redis.UniversalClient
func NewFailoverClient ¶
func NewFailoverClient(c *eredis_config.Config) redis.UniversalClient
Types ¶
type RedisClient ¶
type RedisClient struct { Config *eredis_config.Config redis.UniversalClient }
func GetRedis ¶ added in v1.1.6
func GetRedis(dbName string) *RedisClient
GetRedis return a RedisClient
func NewRedisClient ¶
func NewRedisClient(c *eredis_config.Config) *RedisClient
func (*RedisClient) GetClient ¶
func (r *RedisClient) GetClient() *redis.Client
GetClient try to get a redis.client
func (*RedisClient) GetClusterClient ¶
func (r *RedisClient) GetClusterClient() *redis.ClusterClient
GetClusterClient try to get a redis.ClusterClient
func (*RedisClient) GetFailoverClient ¶
func (r *RedisClient) GetFailoverClient() *redis.Client
GetFailoverClient try to get a redis Failover Sentinel client
func (*RedisClient) GetUniversalClient ¶
func (r *RedisClient) GetUniversalClient() redis.UniversalClient
GetUniversalClient returns a universal redis client(ClusterClient, SimpleClient or FailoverClient), it depends on you config.
Click to show internal directories.
Click to hide internal directories.