Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Source string `yaml:"source"` //如果该字段不为空,则直接适用打开该链接 Addr string `yaml:"addr"` Password string `yaml:"password" kms:"encode"` User string `yaml:"user"` DbName string `yaml:"db_name"` Timeout int `yaml:"timeout"` //单位:秒钟 WriteTimeout int `yaml:"write_timeout"` //单位:秒钟 ReadTimeout int `yaml:"read_timeout"` //单位:秒钟 MaxOpenConnections int `yaml:"max_open_connections"` //设置打开数据库连接的最大数量。 MaxIdleConnections int `yaml:"max_idle_connections"` //用于设置连接池中空闲连接的最大数量 MaxLifetime int `yaml:"max_lifetime"` //单位:秒钟 设置了连接可复用的最大时间。 LogLevel string `yaml:"log_level"` SslMode string `yaml:"ssl_mode"` ReadConfig []Config `yaml:"read_config"` }
Config mysql的配置字段
Click to show internal directories.
Click to hide internal directories.