mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
3cc4209d26
relate: https://github.com/milvus-io/milvus/issues/28086 https://github.com/milvus-io/milvus/issues/28940 --------- Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
17 lines
392 B
Go
17 lines
392 B
Go
package connection
|
|
|
|
import "sync"
|
|
|
|
var connectionManagerInstance *connectionManager
|
|
|
|
var getConnectionManagerInstanceOnce sync.Once
|
|
|
|
func GetManager() *connectionManager {
|
|
getConnectionManagerInstanceOnce.Do(func() {
|
|
connectionManagerInstance = newConnectionManager(
|
|
withDuration(defaultConnCheckDuration),
|
|
withTTL(defaultTTLForInactiveConn))
|
|
})
|
|
return connectionManagerInstance
|
|
}
|