Extract name-resolution logic from ManagedChannelImpl for re-use
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
First mentioned in [another comment](https://github.com/grpc/grpc-java/issues/1599#issuecomment-444595810), and then discussed with @ejona86 and @dapengzhang0, it was concluded that we need to extract the following logic:
1. Parse the target string and convert it into a URI
2. Manage NameResolver retries
3. Wire up NameResolver and LoadBalancer
out of `ManagedChannelImpl`, and make it usable in the following cases:
1. **CHANNEL**: `ManagedChannelImpl`
2. **OOB**: `LoadBalancer.Helper#createResolvingOobChannel` (blocking #5495)
3. **CHILD_POLICY**: `XdsLoadBalancer` "custom mode": `XdsLoadBalancer` receives the target name for each locality, and needs to resolve the target name and start a child `LoadBlanacer` for it.
Contributor guide
Assessment
This issue has not been assessed yet.