Go-micro: [FEATURE] add server reflection support for grpc server

Created on 10 Feb 2020  路  12Comments  路  Source: asim/go-micro

Is your feature request related to a problem? Please describe.
Add ability to use with micro grpc service standalone grpc tools like web ui or grpc curl

Describe the solution you'd like
https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md#enable-server-reflection

Additional context
simple change, needs to investigate drawbacks

Most helpful comment

Consider adding an option for exposing grpc.Server, it will help us do more about things, such as registering prometheus, reflection, health etc..

All 12 comments

not so simple as looks before:
as we don't have standard grpc and have micro, we need to implement reflection server by providing
https://github.com/grpc/grpc-go/blob/master/reflection/grpc_reflection_v1alpha/reflection.proto
and have only one rpc for it
rpc ServerReflectionInfo(stream ServerReflectionRequest) returns (stream ServerReflectionResponse);
}

if we fill response with valid data all stuff works fine with it

Now that's interesting. I did not know that we could hack around the problem with this. An interesting solution. How much effort to do you think it is to add this by default to all services? We could add in server/grpc where we do extraction, have a reflection.go file for it?

I think that this is must be option to server. Because it adds additional handler to it. And also may be used to abuse it or something bad. Mostly we can add reflection.go file and slightly modify it for our use-case

So Reflection() option in grpc server package to enable it?

yes, probably

Consider adding an option for exposing grpc.Server, it will help us do more about things, such as registering prometheus, reflection, health etc..

we don't plan to leak abstraction and expose grpc.Server

any updates for this feature?

no updates, i know how to do it, but not have free time

hey @vtolstov any luck on this yet?

yes, i have some stuff for grpc server, but don't know when i can pr something to go-micro.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

5teven picture 5teven  路  5Comments

xmlking picture xmlking  路  7Comments

nicocesar picture nicocesar  路  6Comments

aimpsmile picture aimpsmile  路  9Comments

brandon-welsch picture brandon-welsch  路  3Comments