manticoresoftware / go-sdk

Go client for Manticore Search
https://manticoresearch.com/
Apache License 2.0
54 stars 8 forks source link

does it support go routine and connect pool #3

Open li-bit opened 4 years ago

manticoresearch commented 4 years ago

Can you please provide more details (or some code example) on the functionality that you think is missing? In theory:

tangxinfa commented 2 years ago

After read the code, we can figure out: manticore.Client is not go routine safe, it's just a thin wrap on a net.Conn. We should build a pool of manticore.Client objects if we want access manticore server concurrently. If manticore server restarted, the connection will lost, and we must make sure manticore.Client reconnect afterwards.

tangxinfa commented 2 years ago

manticore.Client.Ping() will cause the connection disconnected, how to detect the connection is alive?