grpc / grpc/grpc-java

ATTR_LB_ADDR_AUTHORITY not available for custom name resolvers

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

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.

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.