Documentation ¶
Index ¶
- Variables
- type Conn
- type ConnPool
- func (p *ConnPool) Close() error
- func (p *ConnPool) CloseConn(cn *Conn) error
- func (p *ConnPool) Filter(fn func(*Conn) bool) error
- func (p *ConnPool) Get(ctx context.Context) (*Conn, error)
- func (p *ConnPool) IdleLen() int
- func (p *ConnPool) Len() int
- func (p *ConnPool) NewConn() (*Conn, error)
- func (p *ConnPool) Put(ctx context.Context, cn *Conn)
- func (p *ConnPool) ReapStaleConns() (int, error)
- func (p *ConnPool) Remove(ctx context.Context, cn *Conn, reason error)
- func (p *ConnPool) Stats() *Stats
- type Options
- type Pooler
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed performs any operation on the closed publisher will return this error. ErrClosed = errors.New("amqp: connection pool is closed") // ErrPoolTimeout timed out waiting to get a connection from the connection pool. ErrPoolTimeout = errors.New("amqp: 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 // number of times free connection was found in the pool Misses uint32 // number of times free connection was NOT found in the pool Timeouts uint32 // number of times a wait timeout occurred TotalConns uint32 // number of total connections in the pool IdleConns uint32 // number of idle connections in the pool StaleConns uint32 // 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.