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 explained in gRFC A52: grpc/proposal#298
  • Loading branch information
temawi committed May 4, 2022
1 parent 75d3e43 commit 8a02214
Show file tree
Hide file tree
Showing 5 changed files with 675 additions and 251 deletions.
4 changes: 1 addition & 3 deletions xds/src/main/java/io/grpc/xds/ClientXdsClient.java
Original file line number Diff line number Diff line change
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.

Loading

0 comments on commit 8a02214

Please sign in to comment.