mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 06:55:03 +00:00
add streaming response to helloworld service
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user