gitcome commented on issue #106:
URL:
https://github.com/apache/apisix-go-plugin-runner/issues/106#issuecomment-1255726280
> Regarding this step `GrpcClient --grpc--> Apisix`, how did you do it? What
tool or command was used ?
client use grpc protocol request Apisix. code as follows:
```
conn, err := grpc.Dial("192.168.0.1:9080",
grpc.WithTransportCredentials(insecure.NewCredentials()))
if nil != err {
return
}
defer func() {
conn.Close()
}()
client := routeguide.NewRouteGuideClient(conn)
md := metadata.MD{}
md.Set("header1", "test")
ctx = metadata.NewOutgoingContext(ctx, md)
var rspheader metadata.MD
var rsptrailer metadata.MD
req := routeguide.Point{Latitude: 99, Longitude: 88}
rsp, err := cli.GetFeature(ctx , &req, grpc.Header(&rspheader),
grpc.Trailer(&rsptrailer))
if err != nil {
logs.Error(err) //here report error "server closed the
stream without sending trailers"
return
}
logs.Info("rsp:", rsp.String())
logs.Info("rspheader:", rspheader)
logs.Info("rsptrailer:", rsptrailer)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]