Add more reflection information to Node client classes

pull/5331/head
murgatroid99 9 years ago
parent 8e92ce4062
commit a3d7794df6
  1. 4
      src/node/src/client.js
  2. 2
      src/node/src/common.js

@ -648,8 +648,8 @@ exports.makeClientConstructor = function(methods, serviceName) {
var deserialize = attrs.responseDeserialize; var deserialize = attrs.responseDeserialize;
Client.prototype[name] = requester_makers[method_type]( Client.prototype[name] = requester_makers[method_type](
attrs.path, serialize, deserialize); attrs.path, serialize, deserialize);
Client.prototype[name].serialize = serialize; // Associate all provided attributes with the method
Client.prototype[name].deserialize = deserialize; _.assign(Client.prototype[name], attrs);
}); });
return Client; return Client;

@ -146,6 +146,8 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
path: prefix + method.name, path: prefix + method.name,
requestStream: method.requestStream, requestStream: method.requestStream,
responseStream: method.responseStream, responseStream: method.responseStream,
requestType: method.resolvedRequestType,
responseType: method.resolvedResponseType,
requestSerialize: serializeCls(method.resolvedRequestType.build()), requestSerialize: serializeCls(method.resolvedRequestType.build()),
requestDeserialize: deserializeCls(method.resolvedRequestType.build(), requestDeserialize: deserializeCls(method.resolvedRequestType.build(),
binaryAsBase64, longsAsStrings), binaryAsBase64, longsAsStrings),

Loading…
Cancel
Save