Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/client timeouts #248

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Feature/client timeouts #248

wants to merge 3 commits into from

Conversation

drewwells
Copy link
Contributor

This should be backwards compatibility for building, but it will alter some behavior. It is now possible to call Validate() long after the 'Connect()' is called. Connect no longer blocks, and will perform the tcp connection in the background.

It will be possible to cancel ValidateContext() calls where previously this used the confusing 'connTimeout' or 'context' of the initial client setup. was not possible unless the client was built shortly before the Validate() call is made or the confusing 'connTimeout' is used. connTimeout would timeout grpc.Dial and would do things on the validate.

Validate() continues the same odd behavior of using the connTimeout flag or the client context, neither of these will do what the client is likely to expect so it should not be used.

I didn't touch the Client interface, b/c the streaming client is not generally used and I didn't feel fit to tackle it. Instead users can leverage ValidateContext by type conversion. NewClient().(*UnaryClient).

@drewwells
Copy link
Contributor Author

dependent on #247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant