Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Source string `mapstructure:"source" mask:":([^@]+)@"` // root:****@tcp(127.0.0.1:3306)/test
DryRun bool `mapstructure:"dryRun" yaml:"dryRun"`
SlowThreshold int `mapstructure:"slowThreshold" yaml:"slowThreshold"`
MaxLifeTime int `mapstructure:"maxLifeTime" yaml:"maxLifeTime"`
MaxOpenConn int `mapstructure:"maxOpenConn" yaml:"maxOpenConn"`
MaxIdleConn int `mapstructure:"maxIdleConn" yaml:"maxIdleConn"`
}
type DBManager ¶
type DBManager struct {
// contains filtered or unexported fields
}
多数据源管理
func NewDBManager ¶
func NewDBManager(cfgKV map[string]InstanceConfig) (*DBManager, error)
type InstanceConfig ¶
Click to show internal directories.
Click to hide internal directories.