mirror of https://github.com/milvus-io/milvus.git
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
|
|
}
|