Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PoolConfig ¶
type PoolConfig struct { // MaxIdleConns <=0: no idle connections MaxIdleConns int `json:"maxIdleConns" yaml:"maxIdleConns"` // MaxOpenConns <= 0: there is no limit on the number of open connections MaxOpenConns int `json:"maxOpenConns" yaml:"maxOpenConns"` // ConnMaxLifetime <= 0: connections are not closed due to a connection's age ConnMaxLifetime time.Duration `json:"connMaxLifetime" yaml:"connMaxLifetime"` }
func (*PoolConfig) TakeEffect ¶ added in v3.0.29
func (pc *PoolConfig) TakeEffect(sqlDB *sql.DB)
TakeEffect 使连接池配置生效.
Click to show internal directories.
Click to hide internal directories.