Skip to content

Commit 20de2e8

Browse files
committed
xds: Use load_balancing_policy if provided in Cluster.
Renames the LegacyLoadBalancerConfigFactory to just LoadBalancerConfigFactory and gives it responsibility for both the legacy and the new LB config mechanism. The new configuration mechanism is exaplained in gRFC A52: grpc/proposal#298
1 parent 75d3e43 commit 20de2e8

File tree

5 files changed

+624
-251
lines changed

5 files changed

+624
-251
lines changed

xds/src/main/java/io/grpc/xds/ClientXdsClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,9 +1635,7 @@ static CdsUpdate processCluster(Cluster cluster, Set<String> retainedEdsResource
16351635
}
16361636
CdsUpdate.Builder updateBuilder = structOrError.getStruct();
16371637

1638-
// TODO: If load_balancing_policy is set in Cluster use it for LB config, otherwise fall back
1639-
// to using the legacy lb_policy field.
1640-
ImmutableMap<String, ?> lbPolicyConfig = LegacyLoadBalancerConfigFactory.newConfig(cluster,
1638+
ImmutableMap<String, ?> lbPolicyConfig = LoadBalancerConfigFactory.newConfig(cluster,
16411639
enableLeastRequest);
16421640

16431641
// Validate the LB config by trying to parse it with the corresponding LB provider.

xds/src/main/java/io/grpc/xds/LegacyLoadBalancerConfigFactory.java

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)