Where is the language reference or grammar for a service definition?
cliffbdf opened this issue · comments
It would be really helpful to have a normative reference for service definitions. Thanks!
@cliffbdf could you elaborate further? We currently support the use of protocol buffers to define gRPC services and their documentation is here: https://developers.google.com/protocol-buffers/docs/proto3
Is that what you were looking for? Could you provide more details around what you are looking for?
If it is indeed the documentation for procol buffers, how / where can we link to it more prominently?
There is a small section on defining services here:
https://developers.google.com/protocol-buffers/docs/proto3#services
But i do agree that it is barebones and does to pass as normative.
https://github.com/grpc/grpc/tree/master/examples/protos has proto examples that you can refer in the meanwhile..
Would updating and improving the section above to ensure that it is normative resolve your concerns?
You need to tell protoc about the gRPC Java plugin in order to get the TaskEngineGrpc.java
output.
From the grpc-java/compiler/
directory, run this to generate the plugin:
../gradlew java_pluginExecutable
And invoke with:
protoc --plugin=protoc-gen-grpc-java=/path/to/grpc-java/compiler/build/exe/java_plugin/protoc-gen-grpc-java --grpc-java_out=. "TaskEngine.proto"
See https://github.com/grpc/grpc-java/blob/master/compiler/README.md for more details.
What version of protoc is installed? (protoc --version
). It's also possible you need to specify the search paths for header files and libraries, see https://github.com/grpc/grpc-java/blob/master/COMPILING.md#mac.