rbetts / voltdbgo

[Deprecated] VoltDB driver for Google go (golang)
Other
31 stars 8 forks source link

Add I/O deadlines. #10

Closed martinhpedersen closed 7 years ago

martinhpedersen commented 9 years ago

Hi Ryan!

I have finally got the opportunity to do some work on this package again :)

This pull request holds the first of several commits working towards adding a higher level interface for connecting to multiple nodes in a VoltDB cluster. I think it is reasonable to divide the work into multiple pull requests, each one implementing isolated features needed for the higher level interface.

But if you prefer, I will be happy to append all those commits to this request.


This adds read/write deadline on every read/write call to Conn.tcpConn, and also uses the DialTimeout function to bring up the connection.

The new method SetResponseDeadline provide the means of overriding the default call response deadline.

The tcpConn is now a net.Conn (was *net.TCPConn), as we were only using the methods from net.Conn and DialTimeout returns this interface.

For your convenience: