gogo / letmegrpc

[maintainer wanted] generates a web form gui from a grpc specification
BSD 3-Clause "New" or "Revised" License
421 stars 48 forks source link

Support streaming methods #36

Closed alenkacz closed 7 years ago

alenkacz commented 7 years ago

It would be nice if streaming grpc methods will be supported

awalterschulze commented 7 years ago

I believe all combinations are tested https://github.com/awalterschulze/goderive

Maybe you can give a more specific example that is breaking and how it is breaking?

alenkacz commented 7 years ago

not sure we both speak about the same thing. Just to be sure, I mean this http://www.grpc.io/docs/guides/concepts.html#server-streaming-rpc

awalterschulze commented 7 years ago

I think it is talking about the same thing

rpliva commented 7 years ago

I prepared simple example where proto file is

syntax = "proto3";

package test.proto;

service TestService {
    rpc NoStream(TestRequest) returns (TestResponse) {}
    rpc OutputStream(TestRequest) returns (stream TestResponse) {}
    rpc InputStream(stream TestRequest) returns (TestResponse) {}
    rpc BiStream(stream TestRequest) returns (stream TestResponse) {}
}

message TestRequest {
    string note = 1;
}

message TestResponse {
    string result = 1;
}

and when I use it I get following result

2017/04/12 19:50:30 # tmpprotos
../../Test.letmegrpc.go:1584: this.client.Upstream undefined (type TestServiceClient has no field or method Upstream)
../../Test.letmegrpc.go:2106: this.client.Bidi undefined (type TestServiceClient has no field or method Bidi)
 exit status 2
awalterschulze commented 7 years ago

Seems there was a bug with Upstream and Bidirectional streams, where the method name was hardcoded. This should fix it https://github.com/gogo/letmegrpc/commit/f0b079aeb01a73ff4d0499dd6177c26cf8cc8399 Thanks for reporting :)