Changed prefixed Client properties to distinguish private and public properties

pull/2704/head
murgatroid99 10 years ago
parent 1e9dd32803
commit 4e53265f64
  1. 4
      src/node/interop/interop_client.js
  2. 16
      src/node/src/client.js

@ -285,7 +285,7 @@ function authTest(expected_user, scope, client, done) {
if (credential.createScopedRequired() && scope) {
credential = credential.createScoped(scope);
}
client.$updateMetadata = grpc.getGoogleAuthDelegate(credential);
client.$_updateMetadata = grpc.getGoogleAuthDelegate(credential);
var arg = {
response_type: 'COMPRESSABLE',
response_size: 314159,
@ -344,7 +344,7 @@ function oauth2Test(expected_user, scope, per_rpc, client, done) {
if (per_rpc) {
updateMetadata('', {}, makeTestCall);
} else {
client.$updateMetadata = updateMetadata;
client.$_updateMetadata = updateMetadata;
makeTestCall(null, {});
}
});

@ -32,7 +32,7 @@
*/
/**
* Server module
* Client module
* @module
*/
@ -272,7 +272,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) {
emitter.getPeer = function getPeer() {
return call.getPeer();
};
this.$updateMetadata(this.$auth_uri, metadata, function(error, metadata) {
this.$_updateMetadata(this.$_auth_uri, metadata, function(error, metadata) {
if (error) {
call.cancel();
callback(error);
@ -340,7 +340,7 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) {
metadata = {};
}
var stream = new ClientWritableStream(call, serialize);
this.$updateMetadata(this.$auth_uri, metadata, function(error, metadata) {
this.$_updateMetadata(this.$_auth_uri, metadata, function(error, metadata) {
if (error) {
call.cancel();
callback(error);
@ -410,7 +410,7 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) {
metadata = {};
}
var stream = new ClientReadableStream(call, deserialize);
this.$updateMetadata(this.$auth_uri, metadata, function(error, metadata) {
this.$_updateMetadata(this.$_auth_uri, metadata, function(error, metadata) {
if (error) {
call.cancel();
stream.emit('error', error);
@ -482,7 +482,7 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) {
metadata = {};
}
var stream = new ClientDuplexStream(call, serialize, deserialize);
this.$updateMetadata(this.$auth_uri, metadata, function(error, metadata) {
this.$_updateMetadata(this.$_auth_uri, metadata, function(error, metadata) {
if (error) {
call.cancel();
stream.emit('error', error);
@ -572,9 +572,9 @@ exports.makeClientConstructor = function(methods, serviceName) {
this.$channel = new grpc.Channel(address, credentials, options);
// Remove the optional DNS scheme, trailing port, and trailing backslash
address = address.replace(/^(dns:\/{3})?([^:\/]+)(:\d+)?\/?$/, '$2');
this.$server_address = address;
this.$auth_uri = 'https://' + this.server_address + '/' + serviceName;
this.$updateMetadata = updateMetadata;
this.$_server_address = address;
this.$_auth_uri = 'https://' + this.server_address + '/' + serviceName;
this.$_updateMetadata = updateMetadata;
}
/**

Loading…
Cancel
Save