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 @@ -119,21 +119,6 @@ will also be happy to provide advice or receive feedback.
119
119
To enable support of UUID in msgpack with [ google/uuid] ( https://github.com/google/uuid ) ,
120
120
import tarantool/uuid submodule.
121
121
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
-
137
122
## Tests
138
123
139
124
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