Skip to content

Commit 7e35d4f

Browse files
committed
readme: move description of multiple connections to comment
1 parent 1bccc12 commit 7e35d4f

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
@@ -119,21 +119,6 @@ will also be happy to provide advice or receive feedback.
119119
To enable support of UUID in msgpack with [google/uuid](https://github.com/google/uuid),
120120
import tarantool/uuid submodule.
121121

122-
## Multi connections
123-
124-
You can use multiple connections config with tarantool/multi.
125-
126-
Main features:
127-
128-
- Check active connection with configurable time interval and on connection fail switch to next in pool.
129-
- Get addresses list from server and reconfigure to use in MultiConnection.
130-
131-
Additional options (configurable via `ConnectWithOpts`):
132-
133-
* `CheckTimeout` - time interval to check for connection timeout and try to switch connection
134-
* `ClusterDiscoveryTime` - time interval to ask server for updated address list (works on with `NodesGetFunctionName` set)
135-
* `NodesGetFunctionName` - server lua function name to call for getting address list
136-
137122
## Tests
138123

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