Hi All,

I currently use GRPC as my backend service protocol, and use Envoy Proxy as 
ingress gateway instead of Nginx.
A descriptor file can be read by Envoy to serve grpc service with http 
restful api, so i add grpc http annotations to proto defination file, like:

    rpc Foo(Empty) returns (Bar) {
        option (google.api.http).get = "foo";
    };

Problem is when I use this proto file generate golang backend server code, 
it'll import the  google/annotations package, which is totally needless for 
grpc service. Annotations only should be compiled when generate descriptor 
file out, this file will be used by Envoy to serve HTTP APIs.
But I can't find a way to separate them, just a solution with a 
configuration file, but it only works with google cloud services.

So does anyone once facing same problem? Any help is grateful.

Thank you.

Rcio

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/a41b5db2-e0bc-4435-aeeb-469f30471487%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to