mirror of https://github.com/ouqiang/gocron
22 lines
270 B
Go
22 lines
270 B
Go
|
package pool
|
||
|
|
||
|
import "errors"
|
||
|
|
||
|
var (
|
||
|
//ErrClosed 连接池已经关闭Error
|
||
|
ErrClosed = errors.New("pool is closed")
|
||
|
)
|
||
|
|
||
|
//Pool 基本方法
|
||
|
type Pool interface {
|
||
|
Get() (interface{}, error)
|
||
|
|
||
|
Put(interface{}) error
|
||
|
|
||
|
Close(interface{}) error
|
||
|
|
||
|
Release()
|
||
|
|
||
|
Len() int
|
||
|
}
|