Get returns existed connection from the pool or creates a new one.
(ctx context.Context)
| 809 | |
| 810 | // Get returns existed connection from the pool or creates a new one. |
| 811 | func (p *ConnPool) Get(ctx context.Context) (*Conn, error) { |
| 812 | return p.getConn(ctx) |
| 813 | } |
| 814 | |
| 815 | // getConn returns a connection from the pool. |
| 816 | func (p *ConnPool) getConn(ctx context.Context) (cn *Conn, err error) { |