aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/interop/messages.proto
diff options
context:
space:
mode:
authorGravatar chenw <chenw@google.com>2014-12-10 15:13:55 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2014-12-11 15:11:44 -0800
commita8fd44adf8855518ee1bc0cad1ee0a533323d9de (patch)
treecf6d1179412c39735480955b3edd8f51fb53e199 /test/cpp/interop/messages.proto
parent505f7232d18eafe607b779efd1caa0ba5e83c37a (diff)
Build CPP interop client in Git-on-[] as well as in [].
To build client in Git-on-[]: # regenerate Makefile net/grpc/tools/buildgen/generate_projects.sh # generate .pb.h and .pb.cc protoc --cpp_out=. --grpc_out=. --plugin=protoc-gen-grpc=[]-bin/net/grpc/compiler/cpp_plugin net/grpc/cpp/test/interop/test.proto net/grpc/cpp/test/interop/empty.proto net/grpc/cpp/test/interop/messages.proto # Complile and link net/grpc/tools/build_grpc_dev.sh bins/interop_client To test against GFE/ESF: # bring up server [] build net/grpc/testing/interop:server_components_env []-bin/net/grpc/testing/interop/server_components_env --manual --rpc_port=25000 # start client /tmp/grpc-codebase/bins/interop_client --enable_ssl=true --server_port="server ssl port listening port" To test [] build against GFE/ESF: [] run net/grpc/cpp:interop_client -- --enable_ssl=true --server_port="server ssl port listening port" Change on 2014/12/10 by chenw <chenw@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81821921
Diffstat (limited to 'test/cpp/interop/messages.proto')
-rw-r--r--test/cpp/interop/messages.proto94
1 files changed, 94 insertions, 0 deletions
diff --git a/test/cpp/interop/messages.proto b/test/cpp/interop/messages.proto
new file mode 100644
index 0000000000..29db0dd8b1
--- /dev/null
+++ b/test/cpp/interop/messages.proto
@@ -0,0 +1,94 @@
+// Message definitions to be used by integration test service definitions.
+
+syntax = "proto2";
+
+package grpc.testing;
+
+// The type of payload that should be returned.
+enum PayloadType {
+ // Compressable text format.
+ COMPRESSABLE = 0;
+
+ // Uncompressable binary format.
+ UNCOMPRESSABLE = 1;
+
+ // Randomly chosen from all other formats defined in this enum.
+ RANDOM = 2;
+}
+
+// A block of data, to simply increase gRPC message size.
+message Payload {
+ // The type of data in body.
+ optional PayloadType type = 1;
+ // Primary contents of payload.
+ optional bytes body = 2;
+}
+
+// Unary request.
+message SimpleRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, server randomly chooses one from other formats.
+ optional PayloadType response_type = 1;
+
+ // Desired payload size in the response from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 response_size = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+}
+
+// Unary response, as configured by the request.
+message SimpleResponse {
+ // Payload to increase message size.
+ optional Payload payload = 1;
+ // The user the request came from, for verifying authentication was
+ // successful when the client expected it.
+ optional int64 effective_gaia_user_id = 2;
+}
+
+// Client-streaming request.
+message StreamingInputCallRequest {
+ // Optional input payload sent along with the request.
+ optional Payload payload = 1;
+
+ // Not expecting any payload from the response.
+}
+
+// Client-streaming response.
+message StreamingInputCallResponse {
+ // Aggregated size of payloads received from the client.
+ optional int32 aggregated_payload_size = 1;
+}
+
+// Configuration for a particular response.
+message ResponseParameters {
+ // Desired payload sizes in responses from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 size = 1;
+
+ // Desired interval between consecutive responses in the response stream in
+ // microseconds.
+ optional int32 interval_us = 2;
+}
+
+// Server-streaming request.
+message StreamingOutputCallRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, the payload from each response in the stream
+ // might be of different types. This is to simulate a mixed type of payload
+ // stream.
+ optional PayloadType response_type = 1;
+
+ // Configuration for each expected response message.
+ repeated ResponseParameters response_parameters = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+}
+
+// Server-streaming response, as configured by the request and parameters.
+message StreamingOutputCallResponse {
+ // Payload to increase response size.
+ optional Payload payload = 1;
+}