Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:52:45 +08:00
commit 37518e0ca3
19 changed files with 1587 additions and 0 deletions

View File

@@ -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.