mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Changed prefixed Client properties to distinguish private and public properties
This commit is contained in:
parent
aca7862c9c
commit
3954abe977
@ -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…
x
Reference in New Issue
Block a user