-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
core: add LoadBalancer.Helper#createResolvingOobChannel() #5415
Conversation
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.
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Add @since
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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()
.