Skip to content
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

RegisterXXXServer with grpc.ServiceRegistrar #1378

Closed
defool opened this issue Oct 28, 2021 · 2 comments
Closed

RegisterXXXServer with grpc.ServiceRegistrar #1378

defool opened this issue Oct 28, 2021 · 2 comments

Comments

@defool
Copy link

defool commented Oct 28, 2021

Is your feature request related to a problem? Please describe.
Can not register server by grpc.ServiceRegistrar, I need something like grpc/grpc-go#3966

Describe the solution you'd like

Change this line
https://github.com/golang/protobuf/blob/master/internal/gengogrpc/grpc.go#L156

to

g.P("func Register", service.GoName, "Server(s ", grpcPackage.Ident("ServiceRegistrar"), ", srv ", serverType, ") {")

Describe alternatives you've considered
None

Additional context
None

@neild
Copy link
Contributor

neild commented Oct 28, 2021

The gRPC code generator in github.com/golang/protobuf/protoc-gen-go has been entirely superseded by google.golang.org/cmd/protoc-gen-go-grpc. We aren't making further changes to the gRPC generator in this module; it continues to exist for backwards compatibility, but users should migrate to the one in the gRPC repository at their convenience.

@neild
Copy link
Contributor

neild commented Nov 4, 2021

Closing: gRPC changes should happen in the gRPC repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants