Module io.inverno.tool.grpc.protocplugin
module io.inverno.tool.grpc.protocplugin
The Inverno gRPC protoc plugin module provides a protoc plugin for generating Inverno gRPC client and server classes.
The InvernoGrpcProtocPlugin
class is the plugin's entry point, it is used to generate client and/or server Inverno classes corresponding to protobuf service definitions.
The plugin is invoked by specifying the executable to the protoc.exe
command as follows:
$ protoc.exe --plugin=protoc-gen-grpc=invernoGrpcProtocPlugin --grpc_out=target/generated-sources/protobuf/java file.proto
The gRPC generator can also be invoked programatically to process a descriptor dump for instance:
PluginProtos.CodeGeneratorResponse response = InvernoGrpcProtocPlugin.serverGenerator().generate(Path.of("path/to/dump");
response.write(System.out);
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Packages