mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Rename ConnectionPoolStat to ConnPoolStat
This commit is contained in:
parent
f9a2501100
commit
2da1751e1a
@ -21,7 +21,7 @@ type ConnPool struct {
|
|||||||
logger Logger
|
logger Logger
|
||||||
}
|
}
|
||||||
|
|
||||||
type ConnectionPoolStat struct {
|
type ConnPoolStat struct {
|
||||||
MaxConnections int // max simultaneous connections to use
|
MaxConnections int // max simultaneous connections to use
|
||||||
CurrentConnections int // current live connections
|
CurrentConnections int // current live connections
|
||||||
AvailableConnections int // unused live connections
|
AvailableConnections int // unused live connections
|
||||||
@ -124,7 +124,7 @@ func (p *ConnPool) Close() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ConnPool) Stat() (s ConnectionPoolStat) {
|
func (p *ConnPool) Stat() (s ConnPoolStat) {
|
||||||
p.cond.L.Lock()
|
p.cond.L.Lock()
|
||||||
defer p.cond.L.Unlock()
|
defer p.cond.L.Unlock()
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ func TestPoolReleaseDiscardsDeadConnections(t *testing.T) {
|
|||||||
|
|
||||||
var c1, c2 *pgx.Conn
|
var c1, c2 *pgx.Conn
|
||||||
var err error
|
var err error
|
||||||
var stat pgx.ConnectionPoolStat
|
var stat pgx.ConnPoolStat
|
||||||
|
|
||||||
if c1, err = pool.Acquire(); err != nil {
|
if c1, err = pool.Acquire(); err != nil {
|
||||||
t.Fatalf("Unexpected error acquiring connection: %v", err)
|
t.Fatalf("Unexpected error acquiring connection: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user