Skip to content

Commit b219738

Browse files
committed
readme: move description of multiple connections to comment
1 parent 3ad2c2e commit b219738

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,6 @@ To contact `go-tarantool` developers on any problems, create an issue at
168168
The developers of the [Tarantool server](http://github.com/tarantool/tarantool)
169169
will also be happy to provide advice or receive feedback.
170170

171-
## Multi connections
172-
173-
You can use multiple connections config with tarantool/multi.
174-
175-
Main features:
176-
177-
- Check active connection with configurable time interval and on connection fail switch to next in pool.
178-
- Get addresses list from server and reconfigure to use in MultiConnection.
179-
180-
Additional options (configurable via `ConnectWithOpts`):
181-
182-
* `CheckTimeout` - time interval to check for connection timeout and try to switch connection
183-
* `ClusterDiscoveryTime` - time interval to ask server for updated address list (works on with `NodesGetFunctionName` set)
184-
* `NodesGetFunctionName` - server lua function name to call for getting address list
185-
186171
## Tests
187172

188173
You need to [install Tarantool](https://www.tarantool.io/en/download/) to run tests.

multi/multi.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ func indexOf(sstring string, data []string) int {
2929
return -1
3030
}
3131

32+
// You can use multiple connections config with tarantool/multi.
33+
// Main features:
34+
// - Check active connection with configurable time interval and on connection
35+
// fail switch to next in pool.
36+
// - Get addresses list from server and reconfigure to use in MultiConnection.
3237
type ConnectionMulti struct {
3338
addrs []string
3439
connOpts tarantool.Opts
@@ -46,8 +51,14 @@ var _ = tarantool.Connector(&ConnectionMulti{}) // check compatibility with conn
4651

4752
// OptsMulti is a way to configure Connection with multiconnect-specific options.
4853
type OptsMulti struct {
49-
CheckTimeout time.Duration
54+
// CheckTimeout is a time interval to check for connection timeout and try to
55+
// switch connection.
56+
CheckTimeout time.Duration
57+
// NodesGetFunctionName is a server Lua function name to call for getting
58+
// address list.
5059
NodesGetFunctionName string
60+
// ClusterDiscoveryTime is a time interval to ask server for updated address
61+
// list (works on with NodesGetFunctionName set).
5162
ClusterDiscoveryTime time.Duration
5263
}
5364

0 commit comments

Comments
 (0)