redis.go 406 字节
Newer Older
E
eoLinker API Management 已提交
1 2
package redis_manager

黄孟柱 已提交
3
import "github.com/go-redis/redis"
E
eoLinker API Management 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

const (
	RedisModeCluster  = "cluster"
	RedisModeStand    = "stand"
)


type Redis interface {
	redis.Cmdable
	GetConfig() RedisConfig
	//Foreach(fn func(client *localRedis.Client) error) error
	Nodes()[]string
}

type RedisConfig interface {
	GetMode() string
	GetAddrs() []string
	GetMasters() []string
	GetDbIndex() int
	GetPassword() string
}