Server reflection lets a client (grpcurl, grpc_cli, Postman)
discover what a server exposes without a local .proto. The service
is grpc.reflection.v1alpha.ServerReflection with one bidi-streaming
method ServerReflectionInfo -- each request message asks one of:
list_services (field 7): "what services do you serve?"
file_by_filename (field 3) / file_containing_symbol
(field 4): "give me the descriptor for X".
This module ships the wire codec for the request / response messages
and a :class:ReflectionService that answers list_services from a
registered service-name list and file_by_filename /
file_containing_symbol from a registered FileDescriptorProto
registry (the blobs tests/tools/proto_gen.py emits per .proto file).
Lookups that miss return NOT_FOUND. As a result grpcurl list,
grpcurl describe, and reflection-driven calls all work once the
generated descriptors are registered.
ServerReflectionInfo is bidi-streaming;
:class:ReflectionBidiHandler adapts :meth:ReflectionService.answer
onto the :trait:flare.grpc.GrpcBidiStreaming server trait, so it is
mountable via GrpcBidiService(ReflectionBidiHandler(svc)).
References: