Skip to content

core: add LoadBalancer.Helper#createResolvingOobChannel() #5415

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

Merged
merged 2 commits into from
Mar 4, 2019

Conversation

zhangkun83
Copy link
Contributor

@zhangkun83 zhangkun83 commented Mar 1, 2019

This can be used by xds LoadBalancer to create a channel to the XDS
traffic director, as the service config will only specify the target
name of the balancer.

This PR only adds the interface to unblock the xds work.
Implementation would take some time thus will come later.

I selected a slightly different name from the original createOobChannel()
to signify their difference. I am open to naming it just createOobChannel().

This can be used by xds LoadBalancer to create a channel to the XDS
traffic director, as the service config will only specify the target
name of the balancer.

This PR only adds the interface to unblock the xds work.
Implementation would take some time thus will come later.
Copy link
Member

@dapengzhang0 dapengzhang0 left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments

*
* <p>The target string will be resolved by a {@link NameResolver} created according to the
* target string. The out-of-band channel doesn't have load-balancing. If multiple addresses
* are resolved for the target, the "pick_first" policy will be applied.
Copy link
Member

Choose a reason for hiding this comment

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

the "pick_first" policy will be applied seems implementation detail, or an instruction for implementors, but the users don't care what's under the hood.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair. I changed it to a descriptive phrasing.

*
* <P>NOT IMPLEMENTED: this method is currently a stub and not yet implemented by gRPC.
*/
public ManagedChannel createResolvingOobChannel(String target) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not against a slight different name, but "createResolvingOobChannel" may not be better than "createOobChannel".

* channels within {@link #shutdown}.
*
* <P>NOT IMPLEMENTED: this method is currently a stub and not yet implemented by gRPC.
*/
Copy link
Member

Choose a reason for hiding this comment

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

nit: Add @since

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@zhangkun83 zhangkun83 merged commit 0e7b8fd into grpc:master Mar 4, 2019
@zhangkun83 zhangkun83 deleted the create_oob_channel_with_target branch March 4, 2019 17:42
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants