Debian Codegraph @

pool.go

raw symbols SCIP
1 package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/
2
3 import (
4 "errorsscip-go gomod github.com/golang/go/src go1.14 errors/"
5 "syncscip-go gomod github.com/golang/go/src go1.14 sync/"
6 "sync/atomicscip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/"
7
8 "golang.org/x/net/contextscip-go gomod golang.org/x/net eb5bcb51f2a3 `golang.org/x/net/context`/"
9 )
10
11 var (
12 errPoolClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/errPoolClosed. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("rethinkdb: pool is closed")
13 )
14
15 const (
16 poolIsNotClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsNotClosed. int32 = 0
17 poolIsClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsClosed. int32 = 1
18 )
19
20 type connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connFactory# func(host string, opts *ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#) (*Connectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#, error)
21
22 // A Pool is used to store a pool of connections to a single RethinkDB server
23 type Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool# struct {
24 hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#host. Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#
25 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#opts. *ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#
26
27 connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns. []*Connectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#
28 pointerscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#pointer. int32
29 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed. int32
30
31 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#connFactory. connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connFactory#
32
33 muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu. syncscip-go gomod github.com/golang/go/src go1.14 sync/.Mutexscip-go gomod github.com/golang/go/src go1.14 sync/Mutex# // protects lazy creating connections
34 }
35
36 // NewPool creates a new connection pool for the given host
37 func NewPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewPool().(host Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#, opts *ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#) (*Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#, error) {
38 return newPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newPool().(host, opts, NewConnectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/NewConnection().)
39 }
40
41 func newPoolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/newPool().(host Hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#, opts *ConnectOptsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#, connFactory connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/connFactory#) (*Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#, error) {
42 initialCap := opts.InitialCapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#InitialCap.
43 if initialCap <= 0 {
44 // Fallback to MaxIdle if InitialCap is zero, this should be removed
45 // when MaxIdle is removed
46 initialCap = opts.MaxIdlescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#MaxIdle.
47 }
48
49 maxOpen := opts.MaxOpenscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#MaxOpen.
50 if maxOpen <= 0 {
51 maxOpen = 1
52 }
53
54 conns := make([]*Connectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#, maxOpen)
55 var err error
56 for i := 0; i < opts.InitialCapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ConnectOpts#InitialCap.; i++ {
57 conns[i], err = connFactory(host.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().(), opts)
58 if err != nil {
59 return nil, err
60 }
61 }
62
63 return &Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#{
64 connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.: conns,
65 pointerscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#pointer.: -1,
66 hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#host.: host,
67 optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#opts.: opts,
68 connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#connFactory.: connFactory,
69 closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed.: poolIsNotClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsNotClosed.,
70 }, nil
71 }
72
73 // Ping verifies a connection to the database is still alive,
74 // establishing a connection if necessary.
75 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) Pingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#Ping().() error {
76 _, err := p.connscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conn().()
77 return err
78 }
79
80 // Close closes the database, releasing any open resources.
81 //
82 // It is rare to Close a Pool, as the Pool handle is meant to be
83 // long-lived and shared between many goroutines.
84 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#Close().() error {
85 if atomicscip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/.LoadInt32scip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/LoadInt32().(&p.closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed.) == poolIsClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsClosed. {
86 return nil
87 }
88
89 p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Lockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Lock().()
90 defer p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Unlock().()
91
92 if p.closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed. == poolIsClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsClosed. {
93 return nil
94 }
95 p.closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed. = poolIsClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsClosed.
96
97 for _, c := range p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns. {
98 if c != nil {
99 err := c.Closescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#Close().()
100 if err != nil {
101 return err
102 }
103 }
104 }
105
106 return nil
107 }
108
109 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) connscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conn().() (*Connectionscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#, error) {
110 if atomicscip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/.LoadInt32scip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/LoadInt32().(&p.closedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#closed.) == poolIsClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/poolIsClosed. {
111 return nil, errPoolClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/errPoolClosed.
112 }
113
114 pos := atomicscip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/.AddInt32scip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/AddInt32().(&p.pointerscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#pointer., 1)
115 if pos == int32(len(p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.)) {
116 atomicscip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/.StoreInt32scip-go gomod github.com/golang/go/src go1.14 `sync/atomic`/StoreInt32().(&p.pointerscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#pointer., 0)
117 }
118 pos = pos % int32(len(p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.))
119
120 var err error
121
122 if p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos] == nil {
123 p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Lockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Lock().()
124 defer p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Unlock().()
125
126 if p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos] == nil {
127 p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos], err = p.connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#connFactory.(p.hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#host..Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().(), p.optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#opts.)
128 if err != nil {
129 return nil, err
130 }
131 }
132 } else if p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos].isBadscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#isBad().() {
133 // connBad connection needs to be reconnected
134 p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Lockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Lock().()
135 defer p.muscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#mu..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/Mutex#Unlock().()
136
137 p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos], err = p.connFactoryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#connFactory.(p.hostscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#host..Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Host#String().(), p.optsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#opts.)
138 if err != nil {
139 return nil, err
140 }
141 }
142
143 return p.connsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conns.[pos], nil
144 }
145
146 // SetInitialPoolCap sets the initial capacity of the connection pool.
147 //
148 // Deprecated: This value should only be set when connecting
149 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) SetInitialPoolCapscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#SetInitialPoolCap().(n int) {
150 return
151 }
152
153 // SetMaxIdleConns sets the maximum number of connections in the idle
154 // connection pool.
155 //
156 // Deprecated: This value should only be set when connecting
157 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) SetMaxIdleConnsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#SetMaxIdleConns().(n int) {
158 return
159 }
160
161 // SetMaxOpenConns sets the maximum number of open connections to the database.
162 //
163 // Deprecated: This value should only be set when connecting
164 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) SetMaxOpenConnsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#SetMaxOpenConns().(n int) {
165 return
166 }
167
168 // Query execution functions
169
170 // Exec executes a query without waiting for any response.
171 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) Execscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#Exec().(ctx contextscip-go gomod golang.org/x/net eb5bcb51f2a3 `golang.org/x/net/context`/.Contextscip-go gomod golang.org/x/net eb5bcb51f2a3 `golang.org/x/net/context`/Context#, q Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#) error {
172 c, err := p.connscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conn().()
173 if err != nil {
174 return err
175 }
176
177 _, _, err = c.Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#Query().(ctx, q)
178 return err
179 }
180
181 // Query executes a query and waits for the response
182 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#Query().(ctx contextscip-go gomod golang.org/x/net eb5bcb51f2a3 `golang.org/x/net/context`/.Contextscip-go gomod golang.org/x/net eb5bcb51f2a3 `golang.org/x/net/context`/Context#, q Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Query#) (*Cursorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Cursor#, error) {
183 c, err := p.connscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conn().()
184 if err != nil {
185 return nil, err
186 }
187
188 _, cursor, err := c.Queryscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#Query().(ctx, q)
189 return cursor, err
190 }
191
192 // Server returns the server name and server UUID being used by a connection.
193 func (p *Poolscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#) Serverscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#Server().() (ServerResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ServerResponse#, error) {
194 var response ServerResponsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ServerResponse#
195
196 c, err := p.connscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Pool#conn().()
197 if err != nil {
198 return response, err
199 }
200
201 response, err = c.Serverscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Connection#Server().()
202 return response, err
203 }