grpc / grpc/grpc-java

Extract name-resolution logic from ManagedChannelImpl for re-use

Abierto
#5,496 2 comentarios 0 reacciones 1 asignado Reclamado por @zhangkun83 Ver en GitHub
Lenguaje dominante
Java
Estrellas
12.1k
Forks
4k
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.