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 + func DeleteMysqlConnection(config MysqlConfig) + func DeleteRedisConnection(config RedisConfig) + func GetOneRandomDBInfo(host, port, dbName string) *idbinfo.DBInfo + func GetRedisConnection(config RedisConfig) (redis.UniversalClient, error) + func InitDBInfoManager() error + func InitDBInfoManager_default() error + func ResetErrorMysqlConnection(config MysqlConfig) + type DBConfig struct + ConnTimeout int + DBType string + DbName string + FlagSsl bool + Host string + MasterName string + MaxIdleConn int + MaxOpenConn int + Password string + Port int + ReadTimeout int + RetryCount int + TimeInterval int + User string + WriteTimeout int + func (this *DBConfig) FormatErr(err interface{}) string + func (this *DBConfig) Init() error + func (this *DBConfig) JoinHostPort() string + func (this DBConfig) String() string + type MysqlConfig struct + func (this *MysqlConfig) Init() error + func (this *MysqlConfig) OpenDB() (*MysqlDB, error) + type MysqlDB struct + func GetMysqlConnection(config MysqlConfig) (*MysqlDB, error) + func (this *MysqlDB) CheckDB() error + func (this *MysqlDB) CloseDB() error + type RedisConfig struct + func (this *RedisConfig) Init() error + func (this *RedisConfig) OpenDB() (redis.UniversalClient, error)