aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/src/client.js
diff options
context:
space:
mode:
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 f843669bd0..b2b4423707 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -531,11 +531,13 @@ exports.makeClientConstructor = function(methods, serviceName) {
* Create a client with the given methods
* @constructor
* @param {string} address The address of the server to connect to
+ * @param {grpc.Credentials} credentials Credentials to use to connect
+ * to the server
* @param {Object} options Options to pass to the underlying channel
* @param {function(string, Object, function)=} updateMetadata function to
* update the metadata for each request
*/
- function Client(address, options, updateMetadata) {
+ function Client(address, credentials, options, updateMetadata) {
if (!updateMetadata) {
updateMetadata = function(uri, metadata, callback) {
callback(null, metadata);
@@ -545,7 +547,7 @@ exports.makeClientConstructor = function(methods, serviceName) {
options = {};
}
options['grpc.primary_user_agent'] = 'grpc-node/' + version;
- this.channel = new grpc.Channel(address, options);
+ this.channel = new grpc.Channel(address, credentials, options);
this.server_address = address.replace(/\/$/, '');
this.auth_uri = this.server_address + '/' + serviceName;
this.updateMetadata = updateMetadata;