Skip to content

Commit a0e3c0d

Browse files
committed
readme: move description of options to inline comment
1 parent 856dcb3 commit a0e3c0d

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
@@ -22,7 +22,6 @@ faster than other packages according to public benchmarks.
2222
* [API reference](#api-reference)
2323
* [Help](#help)
2424
* [Usage](#usage)
25-
* [Options](#options)
2625
* [Tests](#tests)
2726
* [Alternative connectors](#alternative-connectors)
2827

@@ -117,17 +116,6 @@ will also be happy to provide advice or receive feedback.
117116
To enable support of UUID in msgpack with [google/uuid](https://github.com/google/uuid),
118117
import tarantool/uuid submodule.
119118

120-
## Options
121-
122-
* `Timeout` - timeout for any particular request. If `Timeout` is zero request,
123-
any request may block infinitely.
124-
* `Reconnect` - timeout between reconnect attempts. If `Reconnect` is zero, no
125-
reconnects will be performed.
126-
* `MaxReconnects` - maximal number of reconnect failures; after that we give it
127-
up. If `MaxReconnects` is zero, the client will try to reconnect endlessly.
128-
* `User` - user name to log into Tarantool.
129-
* `Pass` - user password to log into Tarantool.
130-
131119
## Multi connections
132120

133121
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)