Quality: Silver Tier.
🐙 userver This library provides non-blocking implementation of reflection service. It is in fact an original implementation with a few modifications to replace all standard primitives with userver ones.
Usage
To be honest, usage is exceedingly simple:
- Link with in your CMakeLists.txt
find_package(userver COMPONENTS grpc grpc-reflection REQUIRED)
target_link_libraries(${PROJECT_NAME} userver::grpc-reflection)
- Add component to your service
#include <userver/grpc-reflection/reflection_service_component.hpp>
int main(int argc, char* argv[]) {
....
....
}
- Add simple line to your config.yaml Don't forget that grpc-reflection requires grpc
yaml
components_manager:
components:
grpc-reflection-service:
# Or you can set these up in grpc-server.service-defaults
task-processor: main-task-processor
middlewares: []
- Thats it. Reflection component will start automatically and expose every gRPC entity in your service.