grpc / grpc/grpc-java

ATTR_LB_ADDR_AUTHORITY not available for custom name resolvers

Aperta
#4,382 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

Using grpc-java-30400e0e58ebd89161370d240907d06b7434fd89 (v1.11.0 + a bunch of commits on master).

I'm looking into implementing a name resolver, but I'm failing to support service config and gRPC LB server address due to the dependency on
core/src/main/java/io/grpc/internal/GrpcAttributes.java, which is not accessible outside the grpc-java package using bazel.

For example, NamesResolved.java has the following code:
``` Map serviceConfig =
config.get(GrpcAttributes.NAME_RESOLVER_SERVICE_CONFIG);
```
and AutoConfiguredLoadBalancerFactor.java has:
```
if (s.getAttributes().get(GrpcAttributes.ATTR_LB_ADDR_AUTHORITY) != null) {
haveBalancerAddress = true;
break;
}
```

Since attribute keys are identity based, I'm not able to see how I can support this in a custom name resolver without hacks or patches.

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.