gax-grpc: allow custom direct path service config#1235
Conversation
This change allows gax-grpc users to specify service config for (mostly) more advanced direct path configuration. e.g. using different load balancing policy. By default, behavior remains same as today.
Codecov Report
@@ Coverage Diff @@
## master #1235 +/- ##
============================================
+ Coverage 78.98% 79.14% +0.16%
- Complexity 1226 1227 +1
============================================
Files 209 209
Lines 5357 5362 +5
Branches 446 448 +2
============================================
+ Hits 4231 4244 +13
+ Misses 948 939 -9
- Partials 178 179 +1
Continue to review full report at Codecov.
|
|
@igorbernstein2, @kolea2, @tritone Could you please review it? Thanks. |
| * "https://github.com/grpc/grpc-proto/blob/master/grpc/service_config/service_config.proto"> | ||
| * the service config proto definition</a> for more details. | ||
| * | ||
| * <p>This is public only for technical reasons, for advanced usage. |
There was a problem hiding this comment.
These two points seem to contradict each other. Rewrite to clarify exactly when and by whom this can be used.
There was a problem hiding this comment.
Removed this line in favor of the @InternalApi annotation.
…allow_providing_service_config_for_direct_path_2
| @Nullable private Credentials credentials; | ||
| @Nullable private ChannelPrimer channelPrimer; | ||
| @Nullable private Boolean attemptDirectPath; | ||
| private ImmutableMap<String, ?> directPathServiceConfig = getDefaultDirectPathServiceConfig(); |
There was a problem hiding this comment.
Builders in gax usually do not have preset values like it is done here. If there is a concept of a default value, then probably it should go the class this builder builds (i.e. essentially move getDefaultDirectPathServiceConfig back to the InstantiatingChannelProvider from its builder).
…allow_providing_service_config_for_direct_path_2
This is resubmission of #879 the original author of which has left google. We need this API for CBT client to set specific direct path service config using route-lookup load balancing policy.
This change allows gax-grpc users to specify service config for (mostly) more advanced direct path configuration. e.g. using different load balancing policy.
By default, behavior remains same as today.