> On 31 May 2021, at 7:18 pm, David Wang <[email protected]> wrote:
> 
> Thank you!  This is exactly what i need
> 

Great, if you need help this project 
https://github.com/fullstorydev/grpcurl/tree/8d7770a962faaed972998574375a554a6576627e/cmd/grpcurl
 
<https://github.com/fullstorydev/grpcurl/tree/8d7770a962faaed972998574375a554a6576627e/cmd/grpcurl>
 may help you as well.


> 在2021年5月31日星期一 UTC+8 下午5:15:55<[email protected]> 写道:
> 
>> On 31 May 2021, at 7:13 pm, David Wang <[email protected] 
>> <applewebdata://05BD8C52-AEAF-41F5-8223-9EF6C7099B83>> 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
>  
> <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 
> <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 <http://grpc.io/>" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <applewebdata://05BD8C52-AEAF-41F5-8223-9EF6C7099B83>.
>> 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] 
> <mailto:[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
>  
> <https://groups.google.com/d/msgid/grpc-io/43a212eb-d300-4bfd-aa67-0ae29e9644a9n%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/DAD4D66F-0CCA-48B0-B0E4-986389D0BE79%40gmail.com.

Reply via email to