-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add service descriptor to code generator #616
Conversation
.call(serviceClient) | ||
.newline | ||
.call(serviceBinding) | ||
.outdent | ||
.newline | ||
.add("}") | ||
|
||
private[this] def serviceDescriptor: PrinterEndo = { | ||
_.add(s"def serviceDescriptor: ${Fs2GrpcServicePrinter.constants.ServiceDescriptor} = ${service.grpcDescriptor.fullName}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ${Fs2GrpcServicePrinter.constants.ServiceDescriptor}
is to avoid conflicts with import com.google.protobuf.Descriptors.{MethodDescriptor, ServiceDescriptor}
d451399
to
8b9e0e0
Compare
d451399
to
8b9e0e0
Compare
Hi @ahjohannessen , Would you have time to have a look at this PR? It exposes the service descriptor to the generated gRPC service companion objects. There could be alternative implementation or naming, but the core idea of linking the |
8b9e0e0
to
8607cdf
Compare
please fix mima by adding |
8607cdf
to
ab4831b
Compare
Thank you! @ahjohannessen |
@Gorzen np - I have made a new release |
This PR adds service descriptor in the code generator for gRPC services.
The service descriptor is useful to get general information about the service. For instance, in our case, we use the name to load the service's configuration.