Finding list of available grpc methods in an api

54 views
Skip to first unread message

Constantine

unread,
Apr 13, 2017, 1:41:58 PM4/13/17
to grpc.io
Hi !

Is there any way to find out about the list of grpc methods available by an API?

Carl Mastrangelo

unread,
Apr 13, 2017, 2:23:47 PM4/13/17
to grpc.io
Yes, if the server has Server Reflection turned on.  It is currently off be default.  It requires that the API use protobuf.  You can send an RPC to the /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo method.  It is defined in reflection.proto in each of the repositories.

Josh Humphries

unread,
Apr 13, 2017, 2:31:12 PM4/13/17
to Carl Mastrangelo, grpc.io
If you are using Go, I've written a library that provides a better client API than just the streaming method on the generated service stub: github.com/jhump/protoreflect/grpcreflect

(It also speaks in terms of *desc.Descriptor types defined in that same repo, which is a much richer and more useful API than the raw *DescriptorProto messages defined in github.com/golang/protobuf/protoc-gen-go/descriptor)

----
Josh Humphries
jh...@bluegosling.com

--
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 grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/8a34a484-b80f-47af-9f56-f3205a55bc0c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages