Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlDatabase ¶
type MysqlDatabase struct { Host string `json:"host"` Port int `json:"port"` User string `json:"user"` Password string `json:"password"` Database string `json:"database"` Charset string `json:"charset"` MaxIdleConnections int `json:"maxIdleConnections" yaml:"maxIdleConnections"` ConnectionMaxIdleTime time.Duration `json:"connectionMaxIdleTime" yaml:"connectionMaxIdleTime"` MaxOpenConnections int `json:"maxOpenConnections" yaml:"maxOpenConnections"` ConnectionMaxLifeTime time.Duration `json:"connectionMaxLifeTime" yaml:"connectionMaxLifeTime"` }
type MysqlSetting ¶
type MysqlSetting struct { Default *MysqlDatabase `json:"default"` EnableRead bool `json:"enableRead" yaml:"enableRead"` Read *MysqlDatabase `json:"read,omitempty" yaml:"read,omitempty"` }
var Setting *MysqlSetting = &MysqlSetting{ Default: &MysqlDatabase{ ConnectionMaxIdleTime: time.Second * 30, MaxIdleConnections: 10, ConnectionMaxLifeTime: time.Second * 180, MaxOpenConnections: 128, }, EnableRead: false, Read: &MysqlDatabase{ ConnectionMaxIdleTime: time.Second * 30, MaxIdleConnections: 10, ConnectionMaxLifeTime: time.Second * 180, MaxOpenConnections: 128, }, }
Click to show internal directories.
Click to hide internal directories.