File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
package pool
2
2
3
3
import (
4
+ "context"
4
5
"time"
5
6
6
7
"github.com/tarantool/go-tarantool/v2"
7
8
)
8
9
9
10
// Pooler is the interface that must be implemented by a connection pool.
10
11
type Pooler interface {
12
+ PoolerTopology
13
+
11
14
ConnectedNow (mode Mode ) (bool , error )
12
15
Close () []error
16
+ // CloseGraceful closes connections in the ConnectionPool gracefully. It waits
17
+ // for all requests to complete.
18
+ CloseGraceful () []error
13
19
ConfiguredTimeout (mode Mode ) (time.Duration , error )
14
20
NewPrepared (expr string , mode Mode ) (* tarantool.Prepared , error )
15
21
NewStream (mode Mode ) (* tarantool.Stream , error )
@@ -155,3 +161,9 @@ type Pooler interface {
155
161
ExecuteAsync (expr string , args interface {},
156
162
mode Mode ) * tarantool.Future
157
163
}
164
+
165
+ // PoolerTopology is the interface that must be implemented by a connection pool and describe topology methods.
166
+ type PoolerTopology interface {
167
+ Add (ctx context.Context , instance Instance ) error
168
+ Remove (name string ) error
169
+ }
You can’t perform that action at this time.
0 commit comments