Documentation ¶
Index ¶
- Variables
- func DialTo(addr string, passwd string) (redis.Conn, error)
- func DialToTimeout(addr string, passwd string, readTimeout, writeTimeout time.Duration) (redis.Conn, error)
- func GetExecutorPath() string
- func GetRedisConfig(addr, passwd string, configName string) (string, error)
- func GetRedisStat(addr, passwd string) (map[string]string, error)
- func GetZkLock(zkConn zkhelper.Conn, productName string) zkhelper.ZLocker
- func InitConfig() (*cfg.Cfg, error)
- func SlaveNoOne(addr, passwd string) error
- func SlaveOf(slave, passwd string, master string) error
- func SlotsInfo(addr, passwd string, fromSlot, toSlot int) (map[int]int, error)
- func SlotsMgrtTagSlot(c redis.Conn, slotId int, toAddr string) (int, int, error)
- type ConnBuilder
- type Strings
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAddr = errors.New("invalid addr") ErrStopMigrateByUser = errors.New("migration stopped by user") )
Functions ¶
func DialToTimeout ¶
func GetExecutorPath ¶
func GetExecutorPath() string
func InitConfig ¶
func SlaveNoOne ¶
Types ¶
type ConnBuilder ¶
type ConnBuilder interface { // Get a conn that will retry automatically when getting error caused by connection issues. // If retry can not rebuild the connection, there will be a fetal error GetSafeConn() zkhelper.Conn // Get a conn that will return error caused by connection issues // It will try to rebuild the connection after return error. GetUnsafeConn() zkhelper.Conn }
func NewConnBuilder ¶
func NewConnBuilder(buildFunc func() (zkhelper.Conn, error)) ConnBuilder
Click to show internal directories.
Click to hide internal directories.