优化连接数的配置

This commit is contained in:
2022-06-05 19:07:25 +08:00
parent fa88e89c97
commit 988ccb1a39
2 changed files with 27 additions and 16 deletions

View File

@ -25,14 +25,16 @@ var (
// Date : 11:24 2022/5/16
func init() {
cfg := &DBConfig{
Host: "localhost",
Port: 3306,
Database: "gateway",
Username: "root",
Password: "zhangdeman",
Charset: "utf8mb4",
MaxOpenConnection: 100,
MaxIdleConnection: 100,
Host: "localhost",
Port: 3306,
Database: "gateway",
Username: "root",
Password: "zhangdeman",
Charset: "utf8mb4",
Connection: Connection{
MaxOpen: 100,
MaxIdle: 100,
},
}
testDBClient, _ = NewDBClient(cfg, cfg, nil, nil, nil)
}