aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/common
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-11-09 14:43:07 -0800
committerGravatar Mark D. Roth <roth@google.com>2016-11-09 14:43:07 -0800
commitdc5d60b814f9fbf254e3ddf63ecfb558b8545d72 (patch)
tree6ba9547e2467fc3569206c8cc66d6cdfb21a8996 /src/cpp/common
parent4bbdda4444d740c50774218427a319931e402fe2 (diff)
Allow setting service config via C++ API, for use in tests.
Diffstat (limited to 'src/cpp/common')
-rw-r--r--src/cpp/common/channel_arguments.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc
index d86ba9dd4e..305ea0f14c 100644
--- a/src/cpp/common/channel_arguments.cc
+++ b/src/cpp/common/channel_arguments.cc
@@ -125,6 +125,11 @@ void ChannelArguments::SetLoadBalancingPolicyName(
SetString(GRPC_ARG_LB_POLICY_NAME, lb_policy_name);
}
+void ChannelArguments::SetServiceConfigJSON(
+ const grpc::string& service_config_json) {
+ SetString(GRPC_ARG_SERVICE_CONFIG, service_config_json);
+}
+
void ChannelArguments::SetInt(const grpc::string& key, int value) {
grpc_arg arg;
arg.type = GRPC_ARG_INTEGER;