grpc / grpc/grpc-java

ATTR_LB_ADDR_AUTHORITY not available for custom name resolvers

オープン
#4,382 コメント 2 件 リアクション 0 件 担当者 1 名 @zhangkun83 が担当を希望しています GitHub で見る
主要言語
Java
スター
12.1k
フォーク
4k
平均マージ
2日 17時間
マージ済み PR(30日)
37

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。