Bluehouse-Technology / grpc

Erlang library for GRPC
Apache License 2.0
100 stars 38 forks source link

How to map java package? #18

Closed wwhai closed 2 years ago

wwhai commented 3 years ago

I use proto file generate a java server, then use same file to generate erlang grpc module, but I can't fond a option to specific "package" instead erlang "module"?

%% This is a unary RPC
onConnect(Connection, Message, Options) ->
    grpc_client:unary(Connection, Message,
                      'RequestHandler', onConnect,
                       decoder(), Options).

Such example, my java package is com.test.RequestHandler.java, When I generate the entire package it not appear. I need this:

onConnect(Connection, Message, Options) ->
    grpc_client:unary(Connection, Message,
                      'com.test.RequestHandler', onConnect,
                       decoder(), Options).

It is my proto file(test.proto):

syntax = "proto3";

option java_package = "com.test";
option java_outer_classname = "Types";

package grpcserver;
//---------------------------
message AuthRequest{
  string clientId = 1;
  string username = 2;
  string password = 3;
}
//....

How can I config package?