Thank you! This is exactly what i need 在2021年5月31日星期一 UTC+8 下午5:15:55<[email protected]> 写道:
> > On 31 May 2021, at 7:13 pm, David Wang <[email protected]> wrote: > > Hi all, > > I develop a gate to transfer message from different clients to micro > services. However, I dont want to change my gate when service rpc has been > changed. So my client give the method name and protobuf information > ([]byte) to gate, the gate dont have the .proto.go file and just want to > use this completed information to call the right gRPC method. I cant find > the right API to realize it. > Like: client.Conn().Invoke(ctx, {methodName}, {protobuf marshal by > client}, bytes) > > > You will need to make use of server reflection: > https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md > > For server, it’s simple to enable it. > > For client (i.e in your gate), have a look at > http://google.golang.org/grpc/reflection/grpc_reflection_v1alpha to make > use of the reflection feature to lookup methods/construct protobuf messages > and others. > > > > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/f4639a89-381a-4c47-8af3-582cd842f3f4n%40googlegroups.com > > <https://groups.google.com/d/msgid/grpc-io/f4639a89-381a-4c47-8af3-582cd842f3f4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/43a212eb-d300-4bfd-aa67-0ae29e9644a9n%40googlegroups.com.
