Skip to content

Commit 3e084d4

Browse files
committed
readme: move description of options to inline comment
Part of #123
1 parent 063ff8d commit 3e084d4

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ faster than other packages according to public benchmarks.
2626
* [API reference](#api-reference)
2727
* [Walking\-through example in Go](#walking-through-example-in-go)
2828
* [Help](#help)
29-
* [Options](#options)
3029
* [Tests](#tests)
3130
* [Alternative connectors](#alternative-connectors)
3231

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

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

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

connection.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,25 @@ type Greeting struct {
158158

159159
// Opts is a way to configure Connection
160160
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
163164
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.
165167
// If specified, then when Tarantool is not reachable or disconnected,
166168
// new connect attempt is performed after pause.
167169
// By default, no reconnection attempts are performed,
168170
// so once disconnected, connection becomes Closed.
169171
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.
171175
// After MaxReconnects attempts Connection becomes closed.
172176
MaxReconnects uint
173-
// User name for authorization.
177+
// User is user name to log into Tarantool.
174178
User string
175-
// Pass is password for authorization.
179+
// Pass is a user password to log into Tarantool.
176180
Pass string
177181
// RateLimit limits number of 'in-fly' request, i.e. already put into
178182
// requests queue, but not yet answered by server or timeouted.

0 commit comments

Comments
 (0)