aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/src/client.js
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-02-17 12:59:26 -0800
committerGravatar murgatroid99 <mlumish@google.com>2016-02-17 12:59:26 -0800
commitc02910b07ae492098d7d0c1bca747fbcad742393 (patch)
tree4913561a1ea4a9193ea957089c2e66e98a5d7662 /src/node/src/client.js
parent7da3297be7068a5a167991efafb2ec4eba2b2779 (diff)
Node: add options to modify ProtoBuf behavior
Diffstat (limited to 'src/node/src/client.js')
-rw-r--r--src/node/src/client.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/node/src/client.js b/src/node/src/client.js
index b5247a69ee..5523d6b9a4 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -698,13 +698,15 @@ exports.waitForClientReady = function(client, deadline, callback) {
* Creates a constructor for clients for the given service
* @param {ProtoBuf.Reflect.Service} service The service to generate a client
* for
+ * @param {Object=} options Options to apply to the client
* @return {function(string, Object)} New client constructor
*/
-exports.makeProtobufClientConstructor = function(service) {
- var method_attrs = common.getProtobufServiceAttrs(service, service.name);
+exports.makeProtobufClientConstructor = function(service, options) {
+ var method_attrs = common.getProtobufServiceAttrs(service, service.name, options);
var Client = exports.makeClientConstructor(
method_attrs, common.fullyQualifiedName(service));
Client.service = service;
+ Client.service.grpc_options = options;
return Client;
};