ATTR_LB_ADDR_AUTHORITY not available for custom name resolvers
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.