Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package example;
|
||||
|
||||
option go_package = "example.com/grpc-service-generator/examples";
|
||||
|
||||
// The service definition.
|
||||
service StreamingService {
|
||||
// Sends a greeting
|
||||
rpc ClientStreamingExample (stream ClientStreamingRequest) returns (ClientStreamingResponse) {}
|
||||
}
|
||||
|
||||
// The request message containing the user's name.
|
||||
message ClientStreamingRequest {
|
||||
string message = 1; // The message from the client. Can represent chunks of data.
|
||||
}
|
||||
|
||||
// The response message containing the greetings
|
||||
message ClientStreamingResponse {
|
||||
string result = 1; // The aggregated result based on the client's stream.
|
||||
}
|
||||
|
||||
// Instructions:
|
||||
// 1. Define your request and response messages
|
||||
// 2. Define the RPC service, using the stream keyword for streaming RPCs
|
||||
// 3. Implement the server and client code
|
||||
// 4. Remember to handle errors and closing the stream gracefully.
|
||||
Reference in New Issue
Block a user