Versions in this module Expand all Collapse all v3 v3.0.2 Feb 23, 2023 v3.0.1 Aug 31, 2022 Changes in this version + var ErrConnPoolClosed = errors.New("ErrConnPoolClosed") + var ErrConnPoolGetTimeout = errors.New("ErrConnPoolGetTimeout") + var ErrNoIdleConn = errors.New("NoIdleConn") + var GetConnSleepTime = 100 * time.Millisecond + var GetConnTimeout = 60 + var IdleTimeout = 60 + var ReDailTimes = 2 + func GetCallInArgs(funcValue reflect.Value, funcArgs []string, inStart int) ([]reflect.Value, error) + func GetStrMd5(s string) string + func GetStrSha1(data string) string + func GoValuesToYJsonSlice(values []reflect.Value) ([]string, error) + func GoVarToYJson(v interface{}) (string, error) + func GoVarsToYJsonSlice(args ...interface{}) ([]string, error) + func Max(a, b int) int + func Min(a, b int) int + type ConnInterface interface + Clone func() interface{} + Close func() + Dail func(timeout int) error + GetId func() string + IsActive func() bool + SetId func(id string) + type ConnPool struct + Conf ConnPoolConfig + Conn ConnInterface + IdleConn map[string]interface{} + IsClose bool + Locked bool + Mu sync.Mutex + NumOpen int + func NewConnPool(conn ConnInterface, conf ConnPoolConfig) ConnPool + func (p *ConnPool) Close() + func (p *ConnPool) CloseConn(conn interface{}) + func (p *ConnPool) DecodeId(id string) (n int, t int64) + func (p *ConnPool) GenId(randomNum int) string + func (p *ConnPool) Get() (interface{}, error) + func (p *ConnPool) IsConnTimeout(conn interface{}) bool + func (p *ConnPool) Lock() + func (p *ConnPool) NewConn() (interface{}, error) + func (p *ConnPool) Put(conn interface{}, isBadConn bool) + func (p *ConnPool) UnLock() + func (p *ConnPool) UpdateConnTime(conn interface{}) + type ConnPoolConfig struct + GetConnSleepTime time.Duration + GetConnTimeout int + IdleTimeout int + ReDailTimes int + Size int + func NewConnPoolConfig() ConnPoolConfig Other modules containing this package github.com/gojuukaze/YTask/v2