@@ -158,21 +158,25 @@ type Greeting struct {
158
158
159
159
// Opts is a way to configure Connection
160
160
type Opts struct {
161
- // Timeout is requests timeout.
162
- // Also used to setup net.TCPConn.Set(Read|Write)Deadline.
161
+ // Timeout is a timeout for any particular request. If Timeout is
162
+ // zero request, any request may block infinitely.
163
+ // Also used to setup net.TCPConn.Set(Read|Write)Deadline
163
164
Timeout time.Duration
164
- // Reconnect is a pause between reconnection attempts.
165
+ // Reconnect is a timeout between reconnect attempts. If Reconnect is
166
+ // zero, no reconnects will be performed.
165
167
// If specified, then when Tarantool is not reachable or disconnected,
166
168
// new connect attempt is performed after pause.
167
169
// By default, no reconnection attempts are performed,
168
170
// so once disconnected, connection becomes Closed.
169
171
Reconnect time.Duration
170
- // MaxReconnects is a maximum reconnect attempts.
172
+ // MaxReconnects is a maximal number of reconnect failures; after that
173
+ // we give it up. If MaxReconnects is zero, the client will try to
174
+ // reconnect endlessly.
171
175
// After MaxReconnects attempts Connection becomes closed.
172
176
MaxReconnects uint
173
- // User name for authorization .
177
+ // User is user name to log into Tarantool .
174
178
User string
175
- // Pass is password for authorization .
179
+ // Pass is a user password to log into Tarantool .
176
180
Pass string
177
181
// RateLimit limits number of 'in-fly' request, i.e. already put into
178
182
// requests queue, but not yet answered by server or timeouted.
0 commit comments