Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_MYSQL_MIN_OPEN = 3 DEFAULT_MYSQL_MAX_OPEN = 10 DEFAULT_MYSQL_MIN_OPEN_LIMIT = DEFAULT_MYSQL_MIN_OPEN DEFAULT_MYSQL_MAX_OPEN_LIMIT = DEFAULT_MYSQL_MAX_OPEN )
View Source
const QueryPerLimit int64 = 50
Variables ¶
View Source
var DB *sql.DB
Functions ¶
Types ¶
type Config ¶
type Config struct { StartupRetryPeriod time.Duration `json:"startup_retry_period" toml:"-" mapstructure:"-"` StartupRetryTimes int `json:"startup_retry_times" toml:"-" mapstructure:"-"` ConnectTimeout time.Duration `json:"connect_timeout" toml:"-" mapstructure:"-"` DSN string `json:"dsn" toml:"dsn" mapstructure:"dsn"` MinOpen int `json:"min_open" toml:"min_open" mapstructure:"min_open"` MaxOpen int `json:"max_open" toml:"max_open" mapstructure:"max_open"` MaxLifetime time.Duration `json:"max_lifetime" toml:"-" mapstructure:"-"` }
func (*Config) VerifyConfig ¶
Click to show internal directories.
Click to hide internal directories.