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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Document how to migrate from Dial, DialContext, WithBlock, WithReturnConnectionError, FailOnNonTempDialError to NewClient #7244

Closed
erezrokah opened this issue May 20, 2024 · 3 comments

Comments

@erezrokah
Copy link

erezrokah commented May 20, 2024

Hello 馃憢

Related issues are #1786 and #7090 (the latter resolved via a release log note I believe).

Please close this issue if you think the above issues are sufficient to address the problem.

Based on the discussions in both issues having migration examples on how to move to NewClient seems like a good idea.

For example there are 2 patterns solving the same issue in #1786 (comment) and #1786 (comment). Which one is the recommended one?

Another issue is replacing grpc.WithBlock(), is it the same as using NewClient then calling Connect? What is the recommended way to connect and block without WithBlock?

If there are existing docs on doing the migration I missed could you point me to the right direction?

@purnesh42H
Copy link
Contributor

@erezrokah thank you for your question. If not already done, you can refer to anti-patterns documentation which has more details on preference for NewClient over grpc.Dial.

Having said that, we are working on adding more documenation and examples for grpc.NewClient

@purnesh42H
Copy link
Contributor

@erezrokah, #7248 has updated /examples and /documentation. Feel free to re-open the issue if anything else.

@erezrokah
Copy link
Author

Thanks @purnesh42H I'll take a look 馃憤

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

No branches or pull requests

3 participants