grpc / grpc/grpc-java

Extract name-resolution logic from ManagedChannelImpl for re-use

Aperta
#5,496 2 commenti 0 reazioni 1 assegnatario Rivendicata da @zhangkun83 Vedi su GitHub
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.