Skip to content

feat: support for gRPC stream APIs #12

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

Merged
merged 3 commits into from
Oct 21, 2021

Conversation

bisakhmondal
Copy link
Contributor

As per the testing requirements of APISIX gRPC streaming proxy (issue apache/apisix#3601), this PR defines necessary gRPC streaming APIs as well as implements them.

Support includes:

  • Server side streaming
  • Client Side
  • BiDi

@CLAassistant
Copy link

CLAassistant commented Oct 19, 2021

CLA assistant check
All committers have signed the CLA.

@bisakhmondal bisakhmondal changed the title feat: Support for gRPC stream APIs feat: support for gRPC stream APIs Oct 19, 2021
@bisakhmondal
Copy link
Contributor Author

cc @spacewander for a review! Thanks

main.go Outdated
@@ -115,6 +116,59 @@ func (s *server) Plus(ctx context.Context, in *pb.PlusRequest) (*pb.PlusReply, e
return &pb.PlusReply{Result: in.A + in.B}, nil
}

// SayHelloMultiReply streams HelloReply back to the client.
func (s *server) SayHelloMultiReply(req *pb.HelloRequest, stream pb.Greeter_SayHelloMultiReplyServer) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to encode the stream type in the function name, so we don't need to add comment for them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

@spacewander spacewander merged commit 18a87a1 into api7:master Oct 21, 2021
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

Successfully merging this pull request may close these issues.

3 participants