You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/27 12:28:07 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #6451: test(grpc-web): add server-side streaming mode test case

spacewander commented on a change in pull request #6451:
URL: https://github.com/apache/apisix/pull/6451#discussion_r815432485



##########
File path: t/plugin/grpc-web/server.go
##########
@@ -18,36 +18,89 @@
 package main
 
 import (
+	"context"
+	"encoding/json"
 	"flag"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
 	"log"
 	"net"
-
-	"apisix.apache.org/plugin/grpc-web/a6"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/reflection"
+	pb "apisix.apache.org/plugin/grpc-web/a6"
 )
 
-var grpcListenAddress string
+type routeServiceServer struct {
+	savedRoutes []*pb.Route
+}
+
+func (rss *routeServiceServer) GetRoute(ctx context.Context, req *pb.Query) (*pb.Route, error) {

Review comment:
       Would be better to use a backend which responds the data streamingly to test




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org