Method request for grpcio

20 views
Skip to first unread message

martin....@gmail.com

unread,
Nov 9, 2017, 4:14:01 AM11/9/17
to grpc.io
Hi. I am implementing automatic service discovery in one of my projects. Currently in python. Problem is there is currently no official way that I know of to get all HTTP handlers from the server object. Therefore If I start a server I would like to enumerate the grpc.server to get all request handlers  (/Service.Name/Service.Method   the GET path).

I can hack the internal structure and read it from there but I am afraid that might change in some future release

Nathaniel Manista

unread,
Nov 9, 2017, 5:59:11 PM11/9/17
to martin....@gmail.com, grpc.io
On Thu, Nov 9, 2017 at 1:14 AM, <martin....@gmail.com> wrote:
Hi. I am implementing automatic service discovery in one of my projects. Currently in python. Problem is there is currently no official way that I know of to get all HTTP handlers from the server object. Therefore If I start a server I would like to enumerate the grpc.server to get all request handlers  (/Service.Name/Service.Method   the GET path).

I can hack the internal structure and read it from there but I am afraid that might change in some future release

Have you taken a look at the grpc_reflection package? It's sadly underdocumented but the source is here and its tests should illustrate its use.
-N
Reply all
Reply to author
Forward
0 new messages