Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Username string //账号 root Password string //密码 Addr []string //ip:port Database string //连接数据库 DialTimeout string //200ms OpenStrategy string //random/in_order (default random) Compress bool //enable lz4 compression MaxExecutionTime string MaxOpenConns int //连接池最多同时打开的连接数 MaxIdleConns int //连接池里最大空闲连接数。必须要比maxOpenConns小 MaxLifetime time.Duration //连接池里面的连接最大存活时长 MaxIdleTime time.Duration //连接池里面的连接最大空闲时长 DriverName string Debug bool Trace bool Prepare bool }
Config 数据库配置
Click to show internal directories.
Click to hide internal directories.