5 type StickyConnPool struct {
14 var _ Pooler = (*StickyConnPool)(nil)
16 func NewStickyConnPool(pool *ConnPool, reusable bool) *StickyConnPool {
17 return &StickyConnPool{
23 func (p *StickyConnPool) NewConn() (*Conn, error) {
24 panic("not implemented")
27 func (p *StickyConnPool) CloseConn(*Conn) error {
28 panic("not implemented")
31 func (p *StickyConnPool) Get() (*Conn, error) {
42 cn, err := p.pool.Get()
51 func (p *StickyConnPool) putUpstream() {
56 func (p *StickyConnPool) Put(cn *Conn) {}
58 func (p *StickyConnPool) removeUpstream() {
63 func (p *StickyConnPool) Remove(cn *Conn) {
67 func (p *StickyConnPool) Len() int {
77 func (p *StickyConnPool) IdleLen() int {
87 func (p *StickyConnPool) Stats() *Stats {
91 func (p *StickyConnPool) Close() error {