Skip to content

Commit 3ad2c2e

Browse files
committed
readme: move description of options to inline comment
1 parent 35b10d8 commit 3ad2c2e

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ faster than other packages according to public benchmarks.
2323
* [API reference](#api-reference)
2424
* [Walking\-through example](#walking-through-example)
2525
* [Help](#help)
26-
* [Options](#options)
2726
* [Tests](#tests)
2827
* [Alternative connectors](#alternative-connectors)
2928

@@ -169,17 +168,6 @@ To contact `go-tarantool` developers on any problems, create an issue at
169168
The developers of the [Tarantool server](http://github.com/tarantool/tarantool)
170169
will also be happy to provide advice or receive feedback.
171170

172-
## Options
173-
174-
* `Timeout` - timeout for any particular request. If `Timeout` is zero request,
175-
any request may block infinitely.
176-
* `Reconnect` - timeout between reconnect attempts. If `Reconnect` is zero, no
177-
reconnects will be performed.
178-
* `MaxReconnects` - maximal number of reconnect failures; after that we give it
179-
up. If `MaxReconnects` is zero, the client will try to reconnect endlessly.
180-
* `User` - user name to log into Tarantool.
181-
* `Pass` - user password to log into Tarantool.
182-
183171
## Multi connections
184172

185173
You can use multiple connections config with tarantool/multi.

connection.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,21 +155,25 @@ type Greeting struct {
155155

156156
// Opts is a way to configure Connection
157157
type Opts struct {
158-
// Timeout is requests timeout.
158+
// Timeout is a timeout for any particular request. If Timeout is
159+
// zero request, any request may block infinitely.
159160
// Also used to setup net.TCPConn.Set(Read|Write)Deadline
160161
Timeout time.Duration
161-
// Reconnect is a pause between reconnection attempts.
162+
// Reconnect is a timeout between reconnect attempts. If Reconnect is
163+
// zero, no reconnects will be performed.
162164
// If specified, then when Tarantool is not reachable or disconnected,
163165
// new connect attempt is performed after pause.
164166
// By default, no reconnection attempts are performed,
165167
// so once disconnected, connection becomes Closed.
166168
Reconnect time.Duration
167-
// MaxReconnects is a maximum reconnect attempts.
169+
// MaxReconnects is a maximal number of reconnect failures; after that
170+
// we give it up. If MaxReconnects is zero, the client will try to
171+
// reconnect endlessly.
168172
// After MaxReconnects attempts Connection becomes closed.
169173
MaxReconnects uint
170-
// User name for authorization
174+
// User is user name to log into Tarantool.
171175
User string
172-
// Pass is password for authorization
176+
// Pass is a user password to log into Tarantool.
173177
Pass string
174178
// RateLimit limits number of 'in-fly' request, i.e. already put into
175179
// requests queue, but not yet answered by server or timeouted.

0 commit comments

Comments
 (0)