Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// 连接池中拥有的最小连接数
InitialCap int
// 最大并发存活连接数
MaxCap int
// 最大空闲连接
MaxIdle int
// 生成连接的方法
Factory func() (interface{}, error)
// 关闭连接的方法
Close func(interface{}) error
// 检查连接是否有效的方法
Ping func(interface{}) error
// 连接最大空闲时间,超过该事件则将失效
IdleTimeout time.Duration
}
Config 连接池相关配置
Source Files
¶
- channel.go
- pool.go
Click to show internal directories.
Click to hide internal directories.