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 11package pool
22
33import (
4+ "context"
45 "time"
56
67 "github.com/tarantool/go-tarantool/v2"
78)
89
910// Pooler is the interface that must be implemented by a connection pool.
1011type Pooler interface {
12+ PoolerTopology
13+
1114 ConnectedNow (mode Mode ) (bool , error )
1215 Close () []error
16+ // CloseGraceful closes connections in the ConnectionPool gracefully. It waits
17+ // for all requests to complete.
18+ CloseGraceful () []error
1319 ConfiguredTimeout (mode Mode ) (time.Duration , error )
1420 NewPrepared (expr string , mode Mode ) (* tarantool.Prepared , error )
1521 NewStream (mode Mode ) (* tarantool.Stream , error )
@@ -155,3 +161,9 @@ type Pooler interface {
155161 ExecuteAsync (expr string , args interface {},
156162 mode Mode ) * tarantool.Future
157163}
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