Skip to content

Commit

Permalink
xds: Use load_balancing_policy if provided in Cluster.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
temawi committed May 3, 2022
1 parent 75d3e43 commit 20de2e8
Show file tree
Hide file tree
Showing 5 changed files with 624 additions and 251 deletions.
4 changes: 1 addition & 3 deletions xds/src/main/java/io/grpc/xds/ClientXdsClient.java
Expand Up @@ -1635,9 +1635,7 @@ static CdsUpdate processCluster(Cluster cluster, Set<String> retainedEdsResource
}
CdsUpdate.Builder updateBuilder = structOrError.getStruct();

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

// Validate the LB config by trying to parse it with the corresponding LB provider.
Expand Down
115 changes: 0 additions & 115 deletions xds/src/main/java/io/grpc/xds/LegacyLoadBalancerConfigFactory.java

This file was deleted.

0 comments on commit 20de2e8

Please sign in to comment.