Versions in this module Expand all Collapse all v0 v0.4.0 Sep 28, 2022 v0.3.0 Sep 28, 2022 Changes in this version + const DB_TYPE_MYSQL + const DB_TYPE_REDIS + const DB_TYPE_REDISCLUSTER + const DB_UPDATE_METHOD_ISM + const DB_UPDATE_METHOD_PING + func AddBackupDBInfo(dbs map[string][]*DBInfo) error + func AddBackupDBInfoByJson(backupDBInfoStr string) error + func AddOriginalDBInfo(db *DBInfo) error + func AddOriginalDBInfoByJson(dbInfoStr string) error + func AddPasswordServer(pwdServer ipassword.PasswordServer) error + func AddRedisSentinel(sentinelMap map[string][]*RedisSentinelInfo) error + func AddRedisSentinelByJson(sentinelInfoStr string) error + func ClearBackupDB() + func DestroyDBInfoManager() + func GetDBInfoManager() *dbInfoManager + func InitDBInfoManager(option *DBInfoManagerOption) error + func InitDBInfoManagerByConfigFile(configFile string) error + type DBInfo struct + DBName string + DBType string + FlagSsl bool + Host string + Password string + Port string + UserName string + func GetOneRandomDBInfo(host, port, dbName string) *DBInfo + func (this *DBInfo) GetAddr() []string + func (this *DBInfo) ISmPing() bool + func (this *DBInfo) ISmPingMysql() bool + func (this *DBInfo) ISmPingRedis() bool + func (this *DBInfo) JoinHostPort() string + func (this *DBInfo) Ping() bool + func (this *DBInfo) PingMysql() bool + func (this *DBInfo) PingRedis() bool + func (this *DBInfo) String() string + type DBInfoConfig struct + BackupDbinfoMap map[string][]*DBInfo + DynamicPwdServer ipassword.PasswordServer + ManagerOption *DBInfoManagerOption + RedisSentinelMap map[string][]*RedisSentinelInfo + type DBInfoManagerOption struct + DBInfoUpdateIntervalSec int + DBInfoUpdateMethod string + EncryptedPwdFlag bool + SwitchDBInfoUpdate bool + YinlianDynamicPwdFlag bool + type HostInfoSet struct + func (this *HostInfoSet) AddDBInfoList(key string, dbList []*DBInfo) + func (this *HostInfoSet) Clear() + func (this *HostInfoSet) GetDBInfoList(key string) []*DBInfo + func (this *HostInfoSet) ResetDBInfoList(key string, dbList []*DBInfo) + type RedisSentinelInfo struct