Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + var ErrConnPoolClosed = errors.New("connection pool is closed") + type ConnectionPool struct + func NewConnectionPool(name string, capacity int, idleTimeout time.Duration, ...) *ConnectionPool + func (cp *ConnectionPool) Active() int64 + func (cp *ConnectionPool) Available() int64 + func (cp *ConnectionPool) Capacity() int64 + func (cp *ConnectionPool) Close() + func (cp *ConnectionPool) Exhausted() int64 + func (cp *ConnectionPool) Get(ctx context.Context) (*PooledDBConnection, error) + func (cp *ConnectionPool) IdleClosed() int64 + func (cp *ConnectionPool) IdleTimeout() time.Duration + func (cp *ConnectionPool) InUse() int64 + func (cp *ConnectionPool) MaxCap() int64 + func (cp *ConnectionPool) Open(info dbconfigs.Connector, mysqlStats *stats.Timings) + func (cp *ConnectionPool) Put(conn *PooledDBConnection) + func (cp *ConnectionPool) SetCapacity(capacity int) (err error) + func (cp *ConnectionPool) SetIdleTimeout(idleTimeout time.Duration) + func (cp *ConnectionPool) StatsJSON() string + func (cp *ConnectionPool) WaitCount() int64 + func (cp *ConnectionPool) WaitTime() time.Duration + type DBConnection struct + func NewDBConnection(info dbconfigs.Connector, mysqlStats *stats.Timings) (*DBConnection, error) + func (dbc *DBConnection) ExecuteFetch(query string, maxrows int, wantfields bool) (*sqltypes.Result, error) + func (dbc *DBConnection) ExecuteStreamFetch(query string, callback func(*sqltypes.Result) error, streamBufferSize int) error + type PooledDBConnection struct + func (pc *PooledDBConnection) Reconnect() error + func (pc *PooledDBConnection) Recycle()