2 Star 2 Fork 8

王布衣/gox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pool.go 589 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 1年前 . 补充Pool接口注释
package pool
import "errors"
var (
//ErrMaxActiveConnReached 连接池超限
ErrMaxActiveConnReached = errors.New("max active conn reached")
// ErrClosed 连接已关闭
ErrClosed = errors.New("pool is closed")
// ErrIsNil 连接无效
ErrIsNil = errors.New("connection is nil. rejecting")
)
// Pool 基本方法
type Pool interface {
// Get 获取一个连接
Get() (any, error)
// Put 归还一个连接
Put(any) error
// Close 关闭连接
Close(any) error
// CloseAll 关闭全部连接
CloseAll()
// Release 释放连接池
Release()
// Len 连接数
Len() int
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/quant1x/gox.git
git@gitee.com:quant1x/gox.git
quant1x
gox
gox
v1.22.5

搜索帮助