File tree Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Expand file tree Collapse file tree 2 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -168,21 +168,6 @@ To contact `go-tarantool` developers on any problems, create an issue at
168
168
The developers of the [ Tarantool server] ( http://github.com/tarantool/tarantool )
169
169
will also be happy to provide advice or receive feedback.
170
170
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
-
186
171
## Tests
187
172
188
173
You need to [ install Tarantool] ( https://www.tarantool.io/en/download/ ) to run tests.
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ func indexOf(sstring string, data []string) int {
29
29
return - 1
30
30
}
31
31
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.
32
37
type ConnectionMulti struct {
33
38
addrs []string
34
39
connOpts tarantool.Opts
@@ -46,8 +51,14 @@ var _ = tarantool.Connector(&ConnectionMulti{}) // check compatibility with conn
46
51
47
52
// OptsMulti is a way to configure Connection with multiconnect-specific options.
48
53
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.
50
59
NodesGetFunctionName string
60
+ // ClusterDiscoveryTime is a time interval to ask server for updated address
61
+ // list (works on with NodesGetFunctionName set).
51
62
ClusterDiscoveryTime time.Duration
52
63
}
53
64
You can’t perform that action at this time.
0 commit comments