Hi!
I write Python client code for gRPC based server application (written in C++) and need to handle open channel errors in some way. What is right way for it?
At least, I need setup timeout for insecure_channel() method call for case I use unreachable target or target host failed. How can I do it?
Right now if I use incorrect server I can successfully create channel and need to set timeout for every gRPC call and fail on first call. But I definitely do not want to proceed with any call attempt if server is not correct. Especially, my app is some kind of database and I think it is right way to handle server connection errors in Connection() constructor (in Python DB API 2.0 terms) not in Cursor methods where I work with actual gRPC calls.
What is right policy to handle channel connection errors (including open channel errors/timeouts) in Python gRPC?
In the docs
https://grpc.io/grpc/python/grpc.html?highlight=insecure_channel#grpc.insecure_channel I see
options parameter but I do not understand what they are. Which parameters can I pass? Can it be channel open timeout or something like this?