forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request grpc#5445 from murgatroid99/node_protoc_plugin
Create a protoc plugin for Node.js gRPC
- Loading branch information
Showing
30 changed files
with
2,257 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// GENERATED CODE -- DO NOT EDIT! | ||
|
||
var grpc = require('grpc'); | ||
var helloworld_pb = require('./helloworld_pb.js'); | ||
|
||
function serialize_HelloReply(arg) { | ||
if (!(arg instanceof helloworld_pb.HelloReply)) { | ||
throw new Error('Expected argument of type HelloReply'); | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
} | ||
function deserialize_HelloReply(buffer_arg) { | ||
return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_HelloRequest(arg) { | ||
if (!(arg instanceof helloworld_pb.HelloRequest)) { | ||
throw new Error('Expected argument of type HelloRequest'); | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
} | ||
function deserialize_HelloRequest(buffer_arg) { | ||
return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
|
||
var GreeterService = exports.GreeterService = { | ||
sayHello: { | ||
path: '/helloworld.Greeter/SayHello', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: helloworld_pb.HelloRequest, | ||
responseType: helloworld_pb.HelloReply, | ||
requestSerialize: serialize_HelloRequest, | ||
requestDeserialize: deserialize_HelloRequest, | ||
responseSerialize: serialize_HelloReply, | ||
responseDeserialize: deserialize_HelloReply, | ||
}, | ||
}; | ||
|
||
exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); |
Oops, something went wrong.