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

Support grpc client #592

Merged
merged 5 commits into from
Jun 21, 2019
Merged

Support grpc client #592

merged 5 commits into from
Jun 21, 2019

Conversation

ChuntaoLu
Copy link
Contributor

This PR adds grpc client support via yarpc.

The integration is done by creating a yarpc client dispatcher object that manages all grpc clients and making it part of gateway object. The dispatcher is used as a default dependency to create grpc clients. And the dispatcher lifecycle methods are hooked into the gateway lifecycle.

@ChuntaoLu ChuntaoLu changed the base branch from master to lu.thriftrw May 9, 2019 17:32
@ChuntaoLu ChuntaoLu mentioned this pull request May 9, 2019
@ChuntaoLu ChuntaoLu requested a review from jacobgreenleaf May 9, 2019 17:35
@coveralls
Copy link

coveralls commented May 9, 2019

Coverage Status

Coverage increased (+0.1%) to 66.902% when pulling 9f71520 on lu.grpc into 3d0daab on master.

@ChuntaoLu ChuntaoLu changed the base branch from lu.thriftrw to master May 9, 2019 20:32
Copy link
Contributor

@jacobgreenleaf jacobgreenleaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks straightforward.

@ChuntaoLu ChuntaoLu merged commit 48b3c92 into master Jun 21, 2019
@ChuntaoLu ChuntaoLu deleted the lu.grpc branch June 21, 2019 20:32
outbounds[key] = transport.Outbounds{
ServiceName: value,
// TODO: this setup opens one TCP connection to the sidecar router per client
// Is it better to share the same TCP connection among the clients?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup a single transport is intended to support several outbounds, this is what yarpcfx does :)

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.

4 participants