eredis

package
v1.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 2

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL