Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseConnPools ¶
func CloseConnPools(cfg *Config)
func CreateConnPools ¶
func CreateConnPools(cfg *Config)
Types ¶
type Config ¶
type Config struct {
*flag.FlagSet `json:"-"`
DBs []*DBConfig `toml:"dbs" json:"dbs"`
ShardingDB string `toml:"sharding-db" json:"sharding-db"`
ShardingTable string `toml:"sharding-table" json:"sharding-table"`
ShardingCount int `toml:"sharding-count" json:"sharding-count"`
DoDDL string `toml:"do-ddl" json:"do-ddl"`
Token string `toml:"token" json:"token"`
UndoDDL string `toml:"undo-ddl" json:"undo-ddl"`
WorkerCount int `toml:"worker-count" json:"worker-count"`
PoolSize int `toml:"pool-size" json:"pool-size"`
LogLevel string `toml:"log-level" json:"log-level"`
ShardingDBs []string
Wg sync.WaitGroup
WgStat sync.WaitGroup
StatChan chan *Stat
// contains filtered or unexported fields
}
Config is the configuration.
type DBConfig ¶
type DBConfig struct {
Host string `toml:"host" json:"host"`
User string `toml:"user" json:"user"`
Password string `toml:"password" json:"password"`
Name string `toml:"name" json:"name"`
Port int `toml:"port" json:"port"`
}
DBConfig is the DB configuration.
Click to show internal directories.
Click to hide internal directories.