Documentation ¶
Index ¶
- Variables
- type Conn
- type ConnPool
- func (p *ConnPool) Close() error
- func (p *ConnPool) CloseConn(cn *Conn)
- func (p *ConnPool) Filter(fn func(*Conn) bool)
- func (p *ConnPool) Get() (*Conn, error)
- func (p *ConnPool) IdleLen() int
- func (p *ConnPool) Len() int
- func (p *ConnPool) Put(cn *Conn)
- func (p *ConnPool) ReapStaleConns() (int, error)
- func (p *ConnPool) Remove(cn *Conn)
- func (p *ConnPool) Stats() *Stats
- type Options
- type Pooler
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("client is closed")
View Source
var ErrPoolTimeout = errors.New("connection pool timeout")
Functions ¶
This section is empty.
Types ¶
type ConnPool ¶
type ConnPool struct {
// contains filtered or unexported fields
}
func (*ConnPool) ReapStaleConns ¶
type Stats ¶
type Stats struct { Hits uint32 `json:"hits"` // number of times free connection was found in the pool Misses uint32 `json:"misses"` // number of times free connection was NOT found in the pool Timeouts uint32 `json:"timeouts"` // number of times a wait timeout occurred TotalConns uint32 `json:"totalConns"` // number of total connections in the pool IdleConns uint32 `json:"idelConns"` // number of idle connections in the pool StaleConns uint32 `json:"staleConns"` // number of stale connections removed from the pool }
Stats contains pool state information and accumulated stats.
Click to show internal directories.
Click to hide internal directories.