NewSingleConnPool creates a new single connection pool. The pool will always return the same connection. The pool will not: - Close the connection - Reconnect the connection - Track the connection in any way
(pool Pooler, cn *Conn)
| 23 | // - Reconnect the connection |
| 24 | // - Track the connection in any way |
| 25 | func NewSingleConnPool(pool Pooler, cn *Conn) *SingleConnPool { |
| 26 | return &SingleConnPool{ |
| 27 | pool: pool, |
| 28 | cn: cn, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func (p *SingleConnPool) NewConn(ctx context.Context) (*Conn, error) { |
| 33 | return p.pool.NewConn(ctx) |
no outgoing calls
no test coverage detected