Skip to content

Commit

Permalink
reflection: add comments on protos (#5209)
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars authored Feb 26, 2022
1 parent 328efcc commit 6f314bd
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
20 changes: 20 additions & 0 deletions reflection/grpc_testing_not_regenerate/dynamic.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright 2022 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";

option go_package = "google.golang.org/grpc/reflection/grpc_testing_not_regenerate";
Expand All @@ -8,6 +25,9 @@ message DynamicRes {}

message DynamicReq {}

// DynamicService is used to test reflection on dynamically constructed protocol
// buffer messages.
service DynamicService {
// DynamicMessage1 is a test RPC for dynamically constructed protobufs.
rpc DynamicMessage1(DynamicReq) returns (DynamicRes);
}
24 changes: 20 additions & 4 deletions reflection/grpc_testing_not_regenerate/testv3.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions reflection/grpc_testing_not_regenerate/testv3.proto
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright 2022 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

syntax = "proto3";

option go_package = "google.golang.org/grpc/reflection/grpc_testing_not_regenerate";
Expand Down Expand Up @@ -31,7 +48,11 @@ message SearchRequestV3 {
string query = 1;
}

// SearchServiceV3 is used to test grpc server reflection.
service SearchServiceV3 {
// Search is a unary RPC.
rpc Search(SearchRequestV3) returns (SearchResponseV3);

// StreamingSearch is a streaming RPC.
rpc StreamingSearch(stream SearchRequestV3) returns (stream SearchResponseV3);
}

0 comments on commit 6f314bd

Please sign in to comment.