murgatroid99 | 4c8f8d8 | 2016-02-26 11:43:05 -0800 | [diff] [blame] | 1 | // GENERATED CODE -- DO NOT EDIT! |
| 2 | |
| 3 | var grpc = require('grpc'); |
| 4 | var helloworld_pb = require('./helloworld_pb.js'); |
| 5 | |
| 6 | function serialize_HelloReply(arg) { |
| 7 | if (!(arg instanceof helloworld_pb.HelloReply)) { |
| 8 | throw new Error('Expected argument of type HelloReply'); |
| 9 | } |
| 10 | return new Buffer(arg.serializeBinary()); |
| 11 | } |
| 12 | function deserialize_HelloReply(buffer_arg) { |
| 13 | return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg)); |
| 14 | } |
| 15 | function serialize_HelloRequest(arg) { |
| 16 | if (!(arg instanceof helloworld_pb.HelloRequest)) { |
| 17 | throw new Error('Expected argument of type HelloRequest'); |
| 18 | } |
| 19 | return new Buffer(arg.serializeBinary()); |
| 20 | } |
| 21 | function deserialize_HelloRequest(buffer_arg) { |
| 22 | return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); |
| 23 | } |
| 24 | |
| 25 | var GreeterService = exports.GreeterService = { |
| 26 | sayHello: { |
| 27 | path: '/helloworld.Greeter/SayHello', |
| 28 | requestStream: false, |
| 29 | responseStream: false, |
| 30 | requestType: helloworld_pb.HelloRequest, |
| 31 | responseType: helloworld_pb.HelloReply, |
| 32 | requestSerialize: serialize_HelloRequest, |
| 33 | requestDeserialize: deserialize_HelloRequest, |
| 34 | responseSerialize: serialize_HelloReply, |
| 35 | responseDeserialize: deserialize_HelloReply, |
| 36 | }, |
| 37 | }; |
| 38 | |
| 39 | exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); |