add streaming response to helloworld service

This commit is contained in:
Asim Aslam
2021-06-11 12:17:54 +01:00
parent 7033fcfdb7
commit 1ae03a6011
4 changed files with 274 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ option go_package = "./proto;helloworld";
service Helloworld {
rpc Call(Request) returns (Response) {}
rpc Stream(StreamRequest) returns (stream StreamResponse) {};
}
// Call returns a personalised "Hello $name" response
@@ -16,3 +17,13 @@ message Request {
message Response {
string message = 1;
}
// Stream returns a streaming helloworld response
message StreamRequest {
string name = 1;
int64 messages = 2;
}
message StreamResponse {
string message = 1;
}