diff options
author | akastornov <akastornov@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
commit | 3a2de774d91ca8d7325aaf81c200b1d2047725e6 (patch) | |
tree | 5674a780ce03a8bbd794733a19c7a70d587e4a14 /contrib/libs/grpc/src/proto | |
parent | 7bd11ff35e97544d119e43447e3e865f2588ee7f (diff) | |
download | ydb-3a2de774d91ca8d7325aaf81c200b1d2047725e6.tar.gz |
Restoring authorship annotation for <akastornov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/grpc/src/proto')
19 files changed, 1134 insertions, 1134 deletions
diff --git a/contrib/libs/grpc/src/proto/grpc/binary_log/v1alpha/log.proto b/contrib/libs/grpc/src/proto/grpc/binary_log/v1alpha/log.proto index 77100ebbef..747a20c9ec 100644 --- a/contrib/libs/grpc/src/proto/grpc/binary_log/v1alpha/log.proto +++ b/contrib/libs/grpc/src/proto/grpc/binary_log/v1alpha/log.proto @@ -1,93 +1,93 @@ // Copyright 2016 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"; - -import "google/protobuf/timestamp.proto"; - -package grpc.binary_log.v1alpha; - -enum Direction { - SERVER_SEND = 0; - SERVER_RECV = 1; - CLIENT_SEND = 2; - CLIENT_RECV = 3; -} - -message KeyValuePair { - string key = 1; - string value = 2; -} - -// Any sort of metadata that may be sent in either direction during a call -message Metadata { - // Cryptographically unique identifier, generated on the client and sent - // to the server. - uint64 rpc_id = 1; - // Timestamp of logging the metadata - google.protobuf.Timestamp timestamp = 2; - Direction direction = 3; - // The actual metadata that is being sent - repeated KeyValuePair metadata = 4; - - // Initial metadata sent by the client to initiate a request - message ClientInitialMetadata { - // The full method name that is being called - string method_name = 1; - // The call's deadline - google.protobuf.Timestamp deadline = 2; - // The address of the connected peer - string peer = 3; - } - - // Arbitrary key/value pairs specified by the user that are not sent over - // the network but are nonetheless useful to log - message UserData { - } - - // Initial metadata response sent by the server after accepting the request - message ServerInitialMetadata { - } - - // Status sent by the server when closing the call on the server side - message ServerStatus { - // The status code - uint32 code = 1; - // The status details - string details = 2; - } - - oneof kind { - ClientInitialMetadata client_initial_metadata = 5; - UserData user_data = 6; - ServerInitialMetadata server_initial_metadata = 7; - ServerStatus server_status = 8; - } -} - -// A message that is sent during a call -message Message { - // Cryptographically unique identifier, generated on the client and sent - // to the server. - uint64 rpc_id = 1; - // The sequence number of the message. Messages sent by the client and by the - // server should have independently incrementing sequence numbers. - uint32 sequence_number = 2; - Direction direction = 3; - // The length of the complete message. - uint32 length = 4; - // The contents of the message. May be a prefix instead of the complete - // message. - bytes data = 5; -} + +syntax = "proto3"; + +import "google/protobuf/timestamp.proto"; + +package grpc.binary_log.v1alpha; + +enum Direction { + SERVER_SEND = 0; + SERVER_RECV = 1; + CLIENT_SEND = 2; + CLIENT_RECV = 3; +} + +message KeyValuePair { + string key = 1; + string value = 2; +} + +// Any sort of metadata that may be sent in either direction during a call +message Metadata { + // Cryptographically unique identifier, generated on the client and sent + // to the server. + uint64 rpc_id = 1; + // Timestamp of logging the metadata + google.protobuf.Timestamp timestamp = 2; + Direction direction = 3; + // The actual metadata that is being sent + repeated KeyValuePair metadata = 4; + + // Initial metadata sent by the client to initiate a request + message ClientInitialMetadata { + // The full method name that is being called + string method_name = 1; + // The call's deadline + google.protobuf.Timestamp deadline = 2; + // The address of the connected peer + string peer = 3; + } + + // Arbitrary key/value pairs specified by the user that are not sent over + // the network but are nonetheless useful to log + message UserData { + } + + // Initial metadata response sent by the server after accepting the request + message ServerInitialMetadata { + } + + // Status sent by the server when closing the call on the server side + message ServerStatus { + // The status code + uint32 code = 1; + // The status details + string details = 2; + } + + oneof kind { + ClientInitialMetadata client_initial_metadata = 5; + UserData user_data = 6; + ServerInitialMetadata server_initial_metadata = 7; + ServerStatus server_status = 8; + } +} + +// A message that is sent during a call +message Message { + // Cryptographically unique identifier, generated on the client and sent + // to the server. + uint64 rpc_id = 1; + // The sequence number of the message. Messages sent by the client and by the + // server should have independently incrementing sequence numbers. + uint32 sequence_number = 2; + Direction direction = 3; + // The length of the complete message. + uint32 length = 4; + // The contents of the message. May be a prefix instead of the complete + // message. + bytes data = 5; +} diff --git a/contrib/libs/grpc/src/proto/grpc/health/v1/health.proto b/contrib/libs/grpc/src/proto/grpc/health/v1/health.proto index 38843ff1e7..7edc88bc10 100644 --- a/contrib/libs/grpc/src/proto/grpc/health/v1/health.proto +++ b/contrib/libs/grpc/src/proto/grpc/health/v1/health.proto @@ -1,48 +1,48 @@ // Copyright 2015 The 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. - + // The canonical version of this proto can be found at // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto -syntax = "proto3"; - -package grpc.health.v1; +syntax = "proto3"; + +package grpc.health.v1; -option csharp_namespace = "Grpc.Health.V1"; +option csharp_namespace = "Grpc.Health.V1"; option go_package = "google.golang.org/grpc/health/grpc_health_v1"; option java_multiple_files = true; option java_outer_classname = "HealthProto"; option java_package = "io.grpc.health.v1"; - -message HealthCheckRequest { - string service = 1; -} - -message HealthCheckResponse { - enum ServingStatus { - UNKNOWN = 0; - SERVING = 1; - NOT_SERVING = 2; + +message HealthCheckRequest { + string service = 1; +} + +message HealthCheckResponse { + enum ServingStatus { + UNKNOWN = 0; + SERVING = 1; + NOT_SERVING = 2; SERVICE_UNKNOWN = 3; // Used only by the Watch method. - } - ServingStatus status = 1; -} - -service Health { + } + ServingStatus status = 1; +} + +service Health { // If the requested service is unknown, the call will fail with status // NOT_FOUND. - rpc Check(HealthCheckRequest) returns (HealthCheckResponse); + rpc Check(HealthCheckRequest) returns (HealthCheckResponse); // Performs a watch for the serving status of the requested service. // The server will immediately send back a message indicating the current @@ -60,4 +60,4 @@ service Health { // call. If the call terminates with any other status (including OK), // clients should retry the call with appropriate exponential backoff. rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse); -} +} diff --git a/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.options b/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.options index 7fbd44b9de..980a9d398c 100644 --- a/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.options +++ b/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.options @@ -1,5 +1,5 @@ -grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 -grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 -grpc.lb.v1.Server.ip_address max_size:16 -grpc.lb.v1.Server.load_balance_token max_size:50 -load_balancer.proto no_unions:true +grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 +grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 +grpc.lb.v1.Server.ip_address max_size:16 +grpc.lb.v1.Server.load_balance_token max_size:50 +load_balancer.proto no_unions:true diff --git a/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.proto b/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.proto index ccf2efd629..7a8066d053 100644 --- a/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.proto +++ b/contrib/libs/grpc/src/proto/grpc/lb/v1/load_balancer.proto @@ -1,57 +1,57 @@ // Copyright 2015 The 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. - + // This file defines the GRPCLB LoadBalancing protocol. // // The canonical version of this proto can be found at // https://github.com/grpc/grpc-proto/blob/master/grpc/lb/v1/load_balancer.proto -syntax = "proto3"; - -package grpc.lb.v1; - +syntax = "proto3"; + +package grpc.lb.v1; + import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; - + option go_package = "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1"; option java_multiple_files = true; option java_outer_classname = "LoadBalancerProto"; option java_package = "io.grpc.grpclb"; - -service LoadBalancer { - // Bidirectional rpc to get a list of servers. + +service LoadBalancer { + // Bidirectional rpc to get a list of servers. rpc BalanceLoad(stream LoadBalanceRequest) returns (stream LoadBalanceResponse); -} - -message LoadBalanceRequest { - oneof load_balance_request_type { - // This message should be sent on the first request to the load balancer. - InitialLoadBalanceRequest initial_request = 1; - - // The client stats should be periodically reported to the load balancer - // based on the duration defined in the InitialLoadBalanceResponse. - ClientStats client_stats = 2; - } -} - -message InitialLoadBalanceRequest { +} + +message LoadBalanceRequest { + oneof load_balance_request_type { + // This message should be sent on the first request to the load balancer. + InitialLoadBalanceRequest initial_request = 1; + + // The client stats should be periodically reported to the load balancer + // based on the duration defined in the InitialLoadBalanceResponse. + ClientStats client_stats = 2; + } +} + +message InitialLoadBalanceRequest { // The name of the load balanced service (e.g., service.googleapis.com). Its - // length should be less than 256 bytes. + // length should be less than 256 bytes. // The name might include a port number. How to handle the port number is up // to the balancer. - string name = 1; -} - + string name = 1; +} + // Contains the number of calls finished for a particular load balance token. message ClientStatsPerToken { // See Server.load_balance_token. @@ -61,15 +61,15 @@ message ClientStatsPerToken { int64 num_calls = 2; } -// Contains client level statistics that are useful to load balancing. Each +// Contains client level statistics that are useful to load balancing. Each // count except the timestamp should be reset to zero after reporting the stats. -message ClientStats { +message ClientStats { // The timestamp of generating the report. google.protobuf.Timestamp timestamp = 1; - + // The total number of RPCs that started. int64 num_calls_started = 2; - + // The total number of RPCs that finished. int64 num_calls_finished = 3; @@ -84,74 +84,74 @@ message ClientStats { repeated ClientStatsPerToken calls_finished_with_drop = 8; reserved 4, 5; -} - -message LoadBalanceResponse { - oneof load_balance_response_type { - // This message should be sent on the first response to the client. - InitialLoadBalanceResponse initial_response = 1; - - // Contains the list of servers selected by the load balancer. The client - // should send requests to these servers in the specified order. - ServerList server_list = 2; +} + +message LoadBalanceResponse { + oneof load_balance_response_type { + // This message should be sent on the first response to the client. + InitialLoadBalanceResponse initial_response = 1; + + // Contains the list of servers selected by the load balancer. The client + // should send requests to these servers in the specified order. + ServerList server_list = 2; // If this field is set, then the client should eagerly enter fallback // mode (even if there are existing, healthy connections to backends). // See go/grpclb-explicit-fallback for more details. FallbackResponse fallback_response = 3; - } -} - -message InitialLoadBalanceResponse { - // This is an application layer redirect that indicates the client should use - // the specified server for load balancing. When this field is non-empty in - // the response, the client should open a separate connection to the - // load_balancer_delegate and call the BalanceLoad method. Its length should - // be less than 64 bytes. - string load_balancer_delegate = 1; - - // This interval defines how often the client should send the client stats - // to the load balancer. Stats should only be reported when the duration is - // positive. + } +} + +message InitialLoadBalanceResponse { + // This is an application layer redirect that indicates the client should use + // the specified server for load balancing. When this field is non-empty in + // the response, the client should open a separate connection to the + // load_balancer_delegate and call the BalanceLoad method. Its length should + // be less than 64 bytes. + string load_balancer_delegate = 1; + + // This interval defines how often the client should send the client stats + // to the load balancer. Stats should only be reported when the duration is + // positive. google.protobuf.Duration client_stats_report_interval = 2; -} - -message ServerList { - // Contains a list of servers selected by the load balancer. The list will - // be updated when server resolutions change or as needed to balance load - // across more servers. The client should consume the server list in order - // unless instructed otherwise via the client_config. - repeated Server servers = 1; - +} + +message ServerList { + // Contains a list of servers selected by the load balancer. The list will + // be updated when server resolutions change or as needed to balance load + // across more servers. The client should consume the server list in order + // unless instructed otherwise via the client_config. + repeated Server servers = 1; + // Was google.protobuf.Duration expiration_interval. reserved 3; -} - +} + // Contains server information. When the drop field is not true, use the other // fields. -message Server { - // A resolved address for the server, serialized in network-byte-order. It may - // either be an IPv4 or IPv6 address. - bytes ip_address = 1; - - // A resolved port number for the server. - int32 port = 2; - +message Server { + // A resolved address for the server, serialized in network-byte-order. It may + // either be an IPv4 or IPv6 address. + bytes ip_address = 1; + + // A resolved port number for the server. + int32 port = 2; + // An opaque but printable token for load reporting. The client must include // the token of the picked server into the initial metadata when it starts a // call to that server. The token is used by the server to verify the request // and to allow the server to report load to the gRPC LB system. The token is // also used in client stats for reporting dropped calls. - // + // // Its length can be variable but must be less than 50 bytes. - string load_balance_token = 3; - + string load_balance_token = 3; + // Indicates whether this particular request should be dropped by the client. // If the request is dropped, there will be a corresponding entry in // ClientStats.calls_finished_with_drop. bool drop = 4; reserved 5; -} +} message FallbackResponse {} diff --git a/contrib/libs/grpc/src/proto/grpc/reflection/v1alpha/reflection.proto b/contrib/libs/grpc/src/proto/grpc/reflection/v1alpha/reflection.proto index 816852f825..2e19fca632 100644 --- a/contrib/libs/grpc/src/proto/grpc/reflection/v1alpha/reflection.proto +++ b/contrib/libs/grpc/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -1,136 +1,136 @@ // Copyright 2016 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. - -// Service exported by server reflection - -syntax = "proto3"; - -package grpc.reflection.v1alpha; - -service ServerReflection { - // The reflection service is structured as a bidirectional stream, ensuring - // all related requests go to a single server. - rpc ServerReflectionInfo(stream ServerReflectionRequest) - returns (stream ServerReflectionResponse); -} - -// The message sent by the client when calling ServerReflectionInfo method. -message ServerReflectionRequest { - string host = 1; - // To use reflection service, the client should set one of the following - // fields in message_request. The server distinguishes requests by their - // defined field and then handles them using corresponding methods. - oneof message_request { - // Find a proto file by the file name. - string file_by_filename = 3; - - // Find the proto file that declares the given fully-qualified symbol name. - // This field should be a fully-qualified symbol name - // (e.g. <package>.<service>[.<method>] or <package>.<type>). - string file_containing_symbol = 4; - - // Find the proto file which defines an extension extending the given - // message type with the given field number. - ExtensionRequest file_containing_extension = 5; - - // Finds the tag numbers used by all known extensions of the given message - // type, and appends them to ExtensionNumberResponse in an undefined order. - // Its corresponding method is best-effort: it's not guaranteed that the - // reflection service will implement this method, and it's not guaranteed - // that this method will provide all extensions. Returns - // StatusCode::UNIMPLEMENTED if it's not implemented. - // This field should be a fully-qualified type name. The format is - // <package>.<type> - string all_extension_numbers_of_type = 6; - - // List the full names of registered services. The content will not be - // checked. - string list_services = 7; - } -} - -// The type name and extension number sent by the client when requesting -// file_containing_extension. -message ExtensionRequest { - // Fully-qualified type name. The format should be <package>.<type> - string containing_type = 1; - int32 extension_number = 2; -} - -// The message sent by the server to answer ServerReflectionInfo method. -message ServerReflectionResponse { - string valid_host = 1; - ServerReflectionRequest original_request = 2; - // The server set one of the following fields accroding to the message_request - // in the request. - oneof message_response { - // This message is used to answer file_by_filename, file_containing_symbol, - // file_containing_extension requests with transitive dependencies. As - // the repeated label is not allowed in oneof fields, we use a - // FileDescriptorResponse message to encapsulate the repeated fields. - // The reflection service is allowed to avoid sending FileDescriptorProtos - // that were previously sent in response to earlier requests in the stream. - FileDescriptorResponse file_descriptor_response = 4; - - // This message is used to answer all_extension_numbers_of_type requst. - ExtensionNumberResponse all_extension_numbers_response = 5; - - // This message is used to answer list_services request. - ListServiceResponse list_services_response = 6; - - // This message is used when an error occurs. - ErrorResponse error_response = 7; - } -} - -// Serialized FileDescriptorProto messages sent by the server answering -// a file_by_filename, file_containing_symbol, or file_containing_extension -// request. -message FileDescriptorResponse { - // Serialized FileDescriptorProto messages. We avoid taking a dependency on - // descriptor.proto, which uses proto2 only features, by making them opaque - // bytes instead. - repeated bytes file_descriptor_proto = 1; -} - -// A list of extension numbers sent by the server answering -// all_extension_numbers_of_type request. -message ExtensionNumberResponse { - // Full name of the base type, including the package name. The format - // is <package>.<type> - string base_type_name = 1; - repeated int32 extension_number = 2; -} - -// A list of ServiceResponse sent by the server answering list_services request. -message ListServiceResponse { - // The information of each service may be expanded in the future, so we use - // ServiceResponse message to encapsulate it. - repeated ServiceResponse service = 1; -} - -// The information of a single service used by ListServiceResponse to answer -// list_services request. -message ServiceResponse { - // Full name of a registered service, including its package name. The format - // is <package>.<service> - string name = 1; -} - -// The error code and error message sent by the server when an error occurs. -message ErrorResponse { - // This field uses the error codes defined in grpc::StatusCode. - int32 error_code = 1; - string error_message = 2; -} + +// Service exported by server reflection + +syntax = "proto3"; + +package grpc.reflection.v1alpha; + +service ServerReflection { + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + rpc ServerReflectionInfo(stream ServerReflectionRequest) + returns (stream ServerReflectionResponse); +} + +// The message sent by the client when calling ServerReflectionInfo method. +message ServerReflectionRequest { + string host = 1; + // To use reflection service, the client should set one of the following + // fields in message_request. The server distinguishes requests by their + // defined field and then handles them using corresponding methods. + oneof message_request { + // Find a proto file by the file name. + string file_by_filename = 3; + + // Find the proto file that declares the given fully-qualified symbol name. + // This field should be a fully-qualified symbol name + // (e.g. <package>.<service>[.<method>] or <package>.<type>). + string file_containing_symbol = 4; + + // Find the proto file which defines an extension extending the given + // message type with the given field number. + ExtensionRequest file_containing_extension = 5; + + // Finds the tag numbers used by all known extensions of the given message + // type, and appends them to ExtensionNumberResponse in an undefined order. + // Its corresponding method is best-effort: it's not guaranteed that the + // reflection service will implement this method, and it's not guaranteed + // that this method will provide all extensions. Returns + // StatusCode::UNIMPLEMENTED if it's not implemented. + // This field should be a fully-qualified type name. The format is + // <package>.<type> + string all_extension_numbers_of_type = 6; + + // List the full names of registered services. The content will not be + // checked. + string list_services = 7; + } +} + +// The type name and extension number sent by the client when requesting +// file_containing_extension. +message ExtensionRequest { + // Fully-qualified type name. The format should be <package>.<type> + string containing_type = 1; + int32 extension_number = 2; +} + +// The message sent by the server to answer ServerReflectionInfo method. +message ServerReflectionResponse { + string valid_host = 1; + ServerReflectionRequest original_request = 2; + // The server set one of the following fields accroding to the message_request + // in the request. + oneof message_response { + // This message is used to answer file_by_filename, file_containing_symbol, + // file_containing_extension requests with transitive dependencies. As + // the repeated label is not allowed in oneof fields, we use a + // FileDescriptorResponse message to encapsulate the repeated fields. + // The reflection service is allowed to avoid sending FileDescriptorProtos + // that were previously sent in response to earlier requests in the stream. + FileDescriptorResponse file_descriptor_response = 4; + + // This message is used to answer all_extension_numbers_of_type requst. + ExtensionNumberResponse all_extension_numbers_response = 5; + + // This message is used to answer list_services request. + ListServiceResponse list_services_response = 6; + + // This message is used when an error occurs. + ErrorResponse error_response = 7; + } +} + +// Serialized FileDescriptorProto messages sent by the server answering +// a file_by_filename, file_containing_symbol, or file_containing_extension +// request. +message FileDescriptorResponse { + // Serialized FileDescriptorProto messages. We avoid taking a dependency on + // descriptor.proto, which uses proto2 only features, by making them opaque + // bytes instead. + repeated bytes file_descriptor_proto = 1; +} + +// A list of extension numbers sent by the server answering +// all_extension_numbers_of_type request. +message ExtensionNumberResponse { + // Full name of the base type, including the package name. The format + // is <package>.<type> + string base_type_name = 1; + repeated int32 extension_number = 2; +} + +// A list of ServiceResponse sent by the server answering list_services request. +message ListServiceResponse { + // The information of each service may be expanded in the future, so we use + // ServiceResponse message to encapsulate it. + repeated ServiceResponse service = 1; +} + +// The information of a single service used by ListServiceResponse to answer +// list_services request. +message ServiceResponse { + // Full name of a registered service, including its package name. The format + // is <package>.<service> + string name = 1; +} + +// The error code and error message sent by the server when an error occurs. +message ErrorResponse { + // This field uses the error codes defined in grpc::StatusCode. + int32 error_code = 1; + string error_message = 2; +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/compiler_test.proto b/contrib/libs/grpc/src/proto/grpc/testing/compiler_test.proto index 9fa5590a59..0cbbc0df1a 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/compiler_test.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/compiler_test.proto @@ -1,52 +1,52 @@ // Copyright 2016 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. - -// File detached comment 1 - -// File detached comment 2 - -// File leading comment 1 -syntax = "proto3"; - -// Ignored detached comment + +// File detached comment 1 + +// File detached comment 2 + +// File leading comment 1 +syntax = "proto3"; + +// Ignored detached comment // The comments in this file are not meant for readability // but rather to test to make sure that the code generator // properly preserves comments on files, services, and RPCs - -// Ignored package leading comment -package grpc.testing; - -message Request { -} -message Response { -} - -// ServiceA detached comment 1 - -// ServiceA detached comment 2 - -// ServiceA leading comment 1 -service ServiceA { - // MethodA1 leading comment 1 - rpc MethodA1(Request) returns (Response); // MethodA1 trailing comment 1 - - // MethodA2 detached leading comment 1 - - // Method A2 leading comment 1 - // Method A2 leading comment 2 - rpc MethodA2(stream Request) returns (Response); - // MethodA2 trailing comment 1 + +// Ignored package leading comment +package grpc.testing; + +message Request { +} +message Response { +} + +// ServiceA detached comment 1 + +// ServiceA detached comment 2 + +// ServiceA leading comment 1 +service ServiceA { + // MethodA1 leading comment 1 + rpc MethodA1(Request) returns (Response); // MethodA1 trailing comment 1 + + // MethodA2 detached leading comment 1 + + // Method A2 leading comment 1 + // Method A2 leading comment 2 + rpc MethodA2(stream Request) returns (Response); + // MethodA2 trailing comment 1 // Method A3 leading comment 1 rpc MethodA3(Request) returns (stream Response); @@ -55,17 +55,17 @@ service ServiceA { // Method A4 leading comment 1 rpc MethodA4(stream Request) returns (stream Response); // Method A4 trailing comment 1 -} -// Ignored ServiceA trailing comment 1 - -// ServiceB leading comment 1 -service ServiceB { - // ServiceB trailing comment 1 - - // MethodB1 leading comment 1 - rpc MethodB1(Request) returns (Response); - // MethodB1 trailing comment 1 -} -// Ignored ServiceB trailing comment 2 - -// Ignored file trailing comment +} +// Ignored ServiceA trailing comment 1 + +// ServiceB leading comment 1 +service ServiceB { + // ServiceB trailing comment 1 + + // MethodB1 leading comment 1 + rpc MethodB1(Request) returns (Response); + // MethodB1 trailing comment 1 +} +// Ignored ServiceB trailing comment 2 + +// Ignored file trailing comment diff --git a/contrib/libs/grpc/src/proto/grpc/testing/control.proto b/contrib/libs/grpc/src/proto/grpc/testing/control.proto index 742b21926e..0356a4266a 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/control.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/control.proto @@ -1,109 +1,109 @@ // Copyright 2015 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"; - -import "src/proto/grpc/testing/payloads.proto"; -import "src/proto/grpc/testing/stats.proto"; - -package grpc.testing; - -enum ClientType { - // Many languages support a basic distinction between using - // sync or async client, and this allows the specification - SYNC_CLIENT = 0; - ASYNC_CLIENT = 1; - OTHER_CLIENT = 2; // used for some language-specific variants + +syntax = "proto3"; + +import "src/proto/grpc/testing/payloads.proto"; +import "src/proto/grpc/testing/stats.proto"; + +package grpc.testing; + +enum ClientType { + // Many languages support a basic distinction between using + // sync or async client, and this allows the specification + SYNC_CLIENT = 0; + ASYNC_CLIENT = 1; + OTHER_CLIENT = 2; // used for some language-specific variants CALLBACK_CLIENT = 3; -} - -enum ServerType { - SYNC_SERVER = 0; - ASYNC_SERVER = 1; - ASYNC_GENERIC_SERVER = 2; - OTHER_SERVER = 3; // used for some language-specific variants +} + +enum ServerType { + SYNC_SERVER = 0; + ASYNC_SERVER = 1; + ASYNC_GENERIC_SERVER = 2; + OTHER_SERVER = 3; // used for some language-specific variants CALLBACK_SERVER = 4; -} - -enum RpcType { - UNARY = 0; - STREAMING = 1; +} + +enum RpcType { + UNARY = 0; + STREAMING = 1; STREAMING_FROM_CLIENT = 2; STREAMING_FROM_SERVER = 3; STREAMING_BOTH_WAYS = 4; -} - -// Parameters of poisson process distribution, which is a good representation -// of activity coming in from independent identical stationary sources. -message PoissonParams { - // The rate of arrivals (a.k.a. lambda parameter of the exp distribution). - double offered_load = 1; -} - -// Once an RPC finishes, immediately start a new one. -// No configuration parameters needed. -message ClosedLoopParams {} - -message LoadParams { - oneof load { - ClosedLoopParams closed_loop = 1; - PoissonParams poisson = 2; - }; -} - -// presence of SecurityParams implies use of TLS -message SecurityParams { - bool use_test_ca = 1; - string server_host_override = 2; +} + +// Parameters of poisson process distribution, which is a good representation +// of activity coming in from independent identical stationary sources. +message PoissonParams { + // The rate of arrivals (a.k.a. lambda parameter of the exp distribution). + double offered_load = 1; +} + +// Once an RPC finishes, immediately start a new one. +// No configuration parameters needed. +message ClosedLoopParams {} + +message LoadParams { + oneof load { + ClosedLoopParams closed_loop = 1; + PoissonParams poisson = 2; + }; +} + +// presence of SecurityParams implies use of TLS +message SecurityParams { + bool use_test_ca = 1; + string server_host_override = 2; string cred_type = 3; -} - -message ChannelArg { - string name = 1; - oneof value { - string str_value = 2; - int32 int_value = 3; - } -} - -message ClientConfig { - // List of targets to connect to. At least one target needs to be specified. - repeated string server_targets = 1; - ClientType client_type = 2; - SecurityParams security_params = 3; - // How many concurrent RPCs to start for each channel. - // For synchronous client, use a separate thread for each outstanding RPC. - int32 outstanding_rpcs_per_channel = 4; - // Number of independent client channels to create. - // i-th channel will connect to server_target[i % server_targets.size()] - int32 client_channels = 5; - // Only for async client. Number of threads to use to start/manage RPCs. - int32 async_client_threads = 7; - RpcType rpc_type = 8; - // The requested load for the entire client (aggregated over all the threads). - LoadParams load_params = 10; - PayloadConfig payload_config = 11; - HistogramParams histogram_params = 12; - - // Specify the cores we should run the client on, if desired - repeated int32 core_list = 13; - int32 core_limit = 14; - - // If we use an OTHER_CLIENT client_type, this string gives more detail - string other_client_api = 15; - - repeated ChannelArg channel_args = 16; +} + +message ChannelArg { + string name = 1; + oneof value { + string str_value = 2; + int32 int_value = 3; + } +} + +message ClientConfig { + // List of targets to connect to. At least one target needs to be specified. + repeated string server_targets = 1; + ClientType client_type = 2; + SecurityParams security_params = 3; + // How many concurrent RPCs to start for each channel. + // For synchronous client, use a separate thread for each outstanding RPC. + int32 outstanding_rpcs_per_channel = 4; + // Number of independent client channels to create. + // i-th channel will connect to server_target[i % server_targets.size()] + int32 client_channels = 5; + // Only for async client. Number of threads to use to start/manage RPCs. + int32 async_client_threads = 7; + RpcType rpc_type = 8; + // The requested load for the entire client (aggregated over all the threads). + LoadParams load_params = 10; + PayloadConfig payload_config = 11; + HistogramParams histogram_params = 12; + + // Specify the cores we should run the client on, if desired + repeated int32 core_list = 13; + int32 core_limit = 14; + + // If we use an OTHER_CLIENT client_type, this string gives more detail + string other_client_api = 15; + + repeated ChannelArg channel_args = 16; // Number of threads that share each completion queue int32 threads_per_cq = 17; @@ -120,143 +120,143 @@ message ClientConfig { // Number of client processes. 0 indicates no restriction. int32 client_processes = 21; -} - -message ClientStatus { ClientStats stats = 1; } - -// Request current stats -message Mark { - // if true, the stats will be reset after taking their snapshot. - bool reset = 1; -} - -message ClientArgs { - oneof argtype { - ClientConfig setup = 1; - Mark mark = 2; - } -} - -message ServerConfig { - ServerType server_type = 1; - SecurityParams security_params = 2; - // Port on which to listen. Zero means pick unused port. - int32 port = 4; - // Only for async server. Number of threads used to serve the requests. - int32 async_server_threads = 7; - // Specify the number of cores to limit server to, if desired - int32 core_limit = 8; +} + +message ClientStatus { ClientStats stats = 1; } + +// Request current stats +message Mark { + // if true, the stats will be reset after taking their snapshot. + bool reset = 1; +} + +message ClientArgs { + oneof argtype { + ClientConfig setup = 1; + Mark mark = 2; + } +} + +message ServerConfig { + ServerType server_type = 1; + SecurityParams security_params = 2; + // Port on which to listen. Zero means pick unused port. + int32 port = 4; + // Only for async server. Number of threads used to serve the requests. + int32 async_server_threads = 7; + // Specify the number of cores to limit server to, if desired + int32 core_limit = 8; // payload config, used in generic server. // Note this must NOT be used in proto (non-generic) servers. For proto servers, // 'response sizes' must be configured from the 'response_size' field of the // 'SimpleRequest' objects in RPC requests. - PayloadConfig payload_config = 9; - - // Specify the cores we should run the server on, if desired - repeated int32 core_list = 10; - - // If we use an OTHER_SERVER client_type, this string gives more detail - string other_server_api = 11; - + PayloadConfig payload_config = 9; + + // Specify the cores we should run the server on, if desired + repeated int32 core_list = 10; + + // If we use an OTHER_SERVER client_type, this string gives more detail + string other_server_api = 11; + // Number of threads that share each completion queue int32 threads_per_cq = 12; - // c++-only options (for now) -------------------------------- - - // Buffer pool size (no buffer pool specified if unset) - int32 resource_quota_size = 1001; + // c++-only options (for now) -------------------------------- + + // Buffer pool size (no buffer pool specified if unset) + int32 resource_quota_size = 1001; repeated ChannelArg channel_args = 1002; // Number of server processes. 0 indicates no restriction. int32 server_processes = 21; -} - -message ServerArgs { - oneof argtype { - ServerConfig setup = 1; - Mark mark = 2; - } -} - -message ServerStatus { - ServerStats stats = 1; - // the port bound by the server - int32 port = 2; - // Number of cores available to the server - int32 cores = 3; -} - -message CoreRequest { -} - -message CoreResponse { - // Number of cores available on the server - int32 cores = 1; -} - -message Void { -} - -// A single performance scenario: input to qps_json_driver -message Scenario { - // Human readable name for this scenario - string name = 1; - // Client configuration - ClientConfig client_config = 2; - // Number of clients to start for the test - int32 num_clients = 3; - // Server configuration - ServerConfig server_config = 4; - // Number of servers to start for the test - int32 num_servers = 5; - // Warmup period, in seconds - int32 warmup_seconds = 6; - // Benchmark time, in seconds - int32 benchmark_seconds = 7; - // Number of workers to spawn locally (usually zero) - int32 spawn_local_worker_count = 8; -} - -// A set of scenarios to be run with qps_json_driver -message Scenarios { - repeated Scenario scenarios = 1; -} - -// Basic summary that can be computed from ClientStats and ServerStats -// once the scenario has finished. -message ScenarioResultSummary -{ +} + +message ServerArgs { + oneof argtype { + ServerConfig setup = 1; + Mark mark = 2; + } +} + +message ServerStatus { + ServerStats stats = 1; + // the port bound by the server + int32 port = 2; + // Number of cores available to the server + int32 cores = 3; +} + +message CoreRequest { +} + +message CoreResponse { + // Number of cores available on the server + int32 cores = 1; +} + +message Void { +} + +// A single performance scenario: input to qps_json_driver +message Scenario { + // Human readable name for this scenario + string name = 1; + // Client configuration + ClientConfig client_config = 2; + // Number of clients to start for the test + int32 num_clients = 3; + // Server configuration + ServerConfig server_config = 4; + // Number of servers to start for the test + int32 num_servers = 5; + // Warmup period, in seconds + int32 warmup_seconds = 6; + // Benchmark time, in seconds + int32 benchmark_seconds = 7; + // Number of workers to spawn locally (usually zero) + int32 spawn_local_worker_count = 8; +} + +// A set of scenarios to be run with qps_json_driver +message Scenarios { + repeated Scenario scenarios = 1; +} + +// Basic summary that can be computed from ClientStats and ServerStats +// once the scenario has finished. +message ScenarioResultSummary +{ // Total number of operations per second over all clients. What is counted as 1 'operation' depends on the benchmark scenarios: // For unary benchmarks, an operation is processing of a single unary RPC. // For streaming benchmarks, an operation is processing of a single ping pong of request and response. - double qps = 1; + double qps = 1; // QPS per server core. - double qps_per_server_core = 2; + double qps_per_server_core = 2; // The total server cpu load based on system time across all server processes, expressed as percentage of a single cpu core. // For example, 85 implies 85% of a cpu core, 125 implies 125% of a cpu core. Since we are accumulating the cpu load across all the server // processes, the value could > 100 when there are multiple servers or a single server using multiple threads and cores. // Same explanation for the total client cpu load below. - double server_system_time = 3; + double server_system_time = 3; // The total server cpu load based on user time across all server processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%) - double server_user_time = 4; + double server_user_time = 4; // The total client cpu load based on system time across all client processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%) - double client_system_time = 5; + double client_system_time = 5; // The total client cpu load based on user time across all client processes, expressed as percentage of a single cpu core. (85 => 85%, 125 => 125%) - double client_user_time = 6; - - // X% latency percentiles (in nanoseconds) - double latency_50 = 7; - double latency_90 = 8; - double latency_95 = 9; - double latency_99 = 10; - double latency_999 = 11; - - // server cpu usage percentage - double server_cpu_usage = 12; - - // Number of requests that succeeded/failed - double successful_requests_per_second = 13; - double failed_requests_per_second = 14; + double client_user_time = 6; + + // X% latency percentiles (in nanoseconds) + double latency_50 = 7; + double latency_90 = 8; + double latency_95 = 9; + double latency_99 = 10; + double latency_999 = 11; + + // server cpu usage percentage + double server_cpu_usage = 12; + + // Number of requests that succeeded/failed + double successful_requests_per_second = 13; + double failed_requests_per_second = 14; // Number of polls called inside completion queue per request double client_polls_per_request = 15; @@ -265,25 +265,25 @@ message ScenarioResultSummary // Queries per CPU-sec over all servers or clients double server_queries_per_cpu_sec = 17; double client_queries_per_cpu_sec = 18; -} - -// Results of a single benchmark scenario. -message ScenarioResult { - // Inputs used to run the scenario. - Scenario scenario = 1; - // Histograms from all clients merged into one histogram. - HistogramData latencies = 2; - // Client stats for each client - repeated ClientStats client_stats = 3; - // Server stats for each server - repeated ServerStats server_stats = 4; - // Number of cores available to each server - repeated int32 server_cores = 5; - // An after-the-fact computed summary - ScenarioResultSummary summary = 6; - // Information on success or failure of each worker - repeated bool client_success = 7; - repeated bool server_success = 8; - // Number of failed requests (one row per status code seen) - repeated RequestResultCount request_results = 9; -} +} + +// Results of a single benchmark scenario. +message ScenarioResult { + // Inputs used to run the scenario. + Scenario scenario = 1; + // Histograms from all clients merged into one histogram. + HistogramData latencies = 2; + // Client stats for each client + repeated ClientStats client_stats = 3; + // Server stats for each server + repeated ServerStats server_stats = 4; + // Number of cores available to each server + repeated int32 server_cores = 5; + // An after-the-fact computed summary + ScenarioResultSummary summary = 6; + // Information on success or failure of each worker + repeated bool client_success = 7; + repeated bool server_success = 8; + // Number of failed requests (one row per status code seen) + repeated RequestResultCount request_results = 9; +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/duplicate/echo_duplicate.proto b/contrib/libs/grpc/src/proto/grpc/testing/duplicate/echo_duplicate.proto index 24b7ee0a24..ac093217d9 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/duplicate/echo_duplicate.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/duplicate/echo_duplicate.proto @@ -1,27 +1,27 @@ - + // Copyright 2015 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. - -// This is a partial copy of echo.proto with a different package name. - -syntax = "proto3"; - -import "src/proto/grpc/testing/echo_messages.proto"; - -package grpc.testing.duplicate; - -service EchoTestService { - rpc Echo(grpc.testing.EchoRequest) returns (grpc.testing.EchoResponse); - rpc ResponseStream(EchoRequest) returns (stream EchoResponse); -} + +// This is a partial copy of echo.proto with a different package name. + +syntax = "proto3"; + +import "src/proto/grpc/testing/echo_messages.proto"; + +package grpc.testing.duplicate; + +service EchoTestService { + rpc Echo(grpc.testing.EchoRequest) returns (grpc.testing.EchoResponse); + rpc ResponseStream(EchoRequest) returns (stream EchoResponse); +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/echo.proto b/contrib/libs/grpc/src/proto/grpc/testing/echo.proto index 33db111864..bffd53ade5 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/echo.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/echo.proto @@ -1,27 +1,27 @@ - + // Copyright 2015 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"; - + +syntax = "proto3"; + package grpc.testing; -import "src/proto/grpc/testing/echo_messages.proto"; +import "src/proto/grpc/testing/echo_messages.proto"; import "src/proto/grpc/testing/simple_messages.proto"; - -service EchoTestService { - rpc Echo(EchoRequest) returns (EchoResponse); + +service EchoTestService { + rpc Echo(EchoRequest) returns (EchoResponse); rpc Echo1(EchoRequest) returns (EchoResponse); rpc Echo2(EchoRequest) returns (EchoResponse); rpc CheckDeadlineUpperBound(SimpleRequest42) returns (StringValue); @@ -29,12 +29,12 @@ service EchoTestService { // A service which checks that the initial metadata sent over contains some // expected key value pair rpc CheckClientInitialMetadata(SimpleRequest42) returns (SimpleResponse42); - rpc RequestStream(stream EchoRequest) returns (EchoResponse); - rpc ResponseStream(EchoRequest) returns (stream EchoResponse); - rpc BidiStream(stream EchoRequest) returns (stream EchoResponse); - rpc Unimplemented(EchoRequest) returns (EchoResponse); -} - + rpc RequestStream(stream EchoRequest) returns (EchoResponse); + rpc ResponseStream(EchoRequest) returns (stream EchoResponse); + rpc BidiStream(stream EchoRequest) returns (stream EchoResponse); + rpc Unimplemented(EchoRequest) returns (EchoResponse); +} + service EchoTest1Service { rpc Echo(EchoRequest) returns (EchoResponse); rpc Echo1(EchoRequest) returns (EchoResponse); @@ -61,9 +61,9 @@ service EchoTest2Service { rpc Unimplemented(EchoRequest) returns (EchoResponse); } -service UnimplementedEchoService { - rpc Unimplemented(EchoRequest) returns (EchoResponse); -} - -// A service without any rpc defined to test coverage. +service UnimplementedEchoService { + rpc Unimplemented(EchoRequest) returns (EchoResponse); +} + +// A service without any rpc defined to test coverage. service NoRpcService {} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/echo_messages.proto b/contrib/libs/grpc/src/proto/grpc/testing/echo_messages.proto index 6f1e5f3404..45b435feac 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/echo_messages.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/echo_messages.proto @@ -1,30 +1,30 @@ - + // Copyright 2015 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"; - -package grpc.testing; - + +syntax = "proto3"; + +package grpc.testing; + option cc_enable_arenas = true; -// Message to be echoed back serialized in trailer. -message DebugInfo { - repeated string stack_entries = 1; - string detail = 2; -} - +// Message to be echoed back serialized in trailer. +message DebugInfo { + repeated string stack_entries = 1; + string detail = 2; +} + // Error status client expects to see. message ErrorStatus { int32 code = 1; @@ -32,18 +32,18 @@ message ErrorStatus { string binary_error_details = 3; } -message RequestParams { - bool echo_deadline = 1; - int32 client_cancel_after_us = 2; - int32 server_cancel_after_us = 3; - bool echo_metadata = 4; - bool check_auth_context = 5; - int32 response_message_length = 6; - bool echo_peer = 7; - string expected_client_identity = 8; // will force check_auth_context. - bool skip_cancelled_check = 9; - string expected_transport_security_type = 10; - DebugInfo debug_info = 11; +message RequestParams { + bool echo_deadline = 1; + int32 client_cancel_after_us = 2; + int32 server_cancel_after_us = 3; + bool echo_metadata = 4; + bool check_auth_context = 5; + int32 response_message_length = 6; + bool echo_peer = 7; + string expected_client_identity = 8; // will force check_auth_context. + bool skip_cancelled_check = 9; + string expected_transport_security_type = 10; + DebugInfo debug_info = 11; bool server_die = 12; // Server should not see a request with this set. string binary_error_details = 13; ErrorStatus expected_error = 14; @@ -51,20 +51,20 @@ message RequestParams { int32 backend_channel_idx = 16; // which backend to send request to bool echo_metadata_initially = 17; bool server_notify_client_when_started = 18; -} - -message EchoRequest { - string message = 1; - RequestParams param = 2; -} - -message ResponseParams { - int64 request_deadline = 1; - string host = 2; - string peer = 3; -} - -message EchoResponse { - string message = 1; - ResponseParams param = 2; -} +} + +message EchoRequest { + string message = 1; + RequestParams param = 2; +} + +message ResponseParams { + int64 request_deadline = 1; + string host = 2; + string peer = 3; +} + +message EchoResponse { + string message = 1; + ResponseParams param = 2; +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/empty.proto b/contrib/libs/grpc/src/proto/grpc/testing/empty.proto index 6a0aa88dfd..c469ca12d4 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/empty.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/empty.proto @@ -1,28 +1,28 @@ - + // Copyright 2015 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"; - -package grpc.testing; - -// An empty message that you can re-use to avoid defining duplicated empty -// messages in your project. A typical example is to use it as argument or the -// return value of a service API. For instance: -// -// service Foo { -// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; -// }; -// -message Empty {} + +syntax = "proto3"; + +package grpc.testing; + +// An empty message that you can re-use to avoid defining duplicated empty +// messages in your project. A typical example is to use it as argument or the +// return value of a service API. For instance: +// +// service Foo { +// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; +// }; +// +message Empty {} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/messages.proto b/contrib/libs/grpc/src/proto/grpc/testing/messages.proto index 70e3427760..d1e3cefe98 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/messages.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/messages.proto @@ -1,53 +1,53 @@ - + // Copyright 2015-2016 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. - -// Message definitions to be used by integration test service definitions. - -syntax = "proto3"; - -package grpc.testing; - -// TODO(dgq): Go back to using well-known types once -// https://github.com/grpc/grpc/issues/6980 has been fixed. -// import "google/protobuf/wrappers.proto"; -message BoolValue { - // The bool value. - bool value = 1; -} - -// The type of payload that should be returned. -enum PayloadType { - // Compressable text format. - COMPRESSABLE = 0; -} - -// A block of data, to simply increase gRPC message size. -message Payload { - // The type of data in body. - PayloadType type = 1; - // Primary contents of payload. - bytes body = 2; -} - -// A protobuf representation for grpc status. This is used by test -// clients to specify a status that the server should attempt to return. -message EchoStatus { - int32 code = 1; - string message = 2; -} - + +// Message definitions to be used by integration test service definitions. + +syntax = "proto3"; + +package grpc.testing; + +// TODO(dgq): Go back to using well-known types once +// https://github.com/grpc/grpc/issues/6980 has been fixed. +// import "google/protobuf/wrappers.proto"; +message BoolValue { + // The bool value. + bool value = 1; +} + +// The type of payload that should be returned. +enum PayloadType { + // Compressable text format. + COMPRESSABLE = 0; +} + +// A block of data, to simply increase gRPC message size. +message Payload { + // The type of data in body. + PayloadType type = 1; + // Primary contents of payload. + bytes body = 2; +} + +// A protobuf representation for grpc status. This is used by test +// clients to specify a status that the server should attempt to return. +message EchoStatus { + int32 code = 1; + string message = 2; +} + // The type of route that a client took to reach a server w.r.t. gRPCLB. // The server must fill in "fallback" if it detects that the RPC reached // the server via the "gRPCLB fallback" path, and "backend" if it detects @@ -63,52 +63,52 @@ enum GrpclbRouteType { GRPCLB_ROUTE_TYPE_BACKEND = 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. - PayloadType response_type = 1; - - // Desired payload size in the response from the server. - int32 response_size = 2; - - // Optional input payload sent along with the request. - Payload payload = 3; - - // Whether SimpleResponse should include username. - bool fill_username = 4; - - // Whether SimpleResponse should include OAuth scope. - bool fill_oauth_scope = 5; - - // Whether to request the server to compress the response. This field is - // "nullable" in order to interoperate seamlessly with clients not able to - // implement the full compression tests by introspecting the call to verify - // the response's compression status. - BoolValue response_compressed = 6; - - // Whether server should return a given status - EchoStatus response_status = 7; - - // Whether the server should expect this request to be compressed. - BoolValue expect_compressed = 8; +// 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. + PayloadType response_type = 1; + + // Desired payload size in the response from the server. + int32 response_size = 2; + + // Optional input payload sent along with the request. + Payload payload = 3; + + // Whether SimpleResponse should include username. + bool fill_username = 4; + + // Whether SimpleResponse should include OAuth scope. + bool fill_oauth_scope = 5; + + // Whether to request the server to compress the response. This field is + // "nullable" in order to interoperate seamlessly with clients not able to + // implement the full compression tests by introspecting the call to verify + // the response's compression status. + BoolValue response_compressed = 6; + + // Whether server should return a given status + EchoStatus response_status = 7; + + // Whether the server should expect this request to be compressed. + BoolValue expect_compressed = 8; // Whether SimpleResponse should include server_id. bool fill_server_id = 9; // Whether SimpleResponse should include grpclb_route_type. bool fill_grpclb_route_type = 10; -} - -// Unary response, as configured by the request. -message SimpleResponse { - // Payload to increase message size. - Payload payload = 1; - // The user the request came from, for verifying authentication was - // successful when the client expected it. - string username = 2; - // OAuth scope. - string oauth_scope = 3; +} + +// Unary response, as configured by the request. +message SimpleResponse { + // Payload to increase message size. + Payload payload = 1; + // The user the request came from, for verifying authentication was + // successful when the client expected it. + string username = 2; + // OAuth scope. + string oauth_scope = 3; // Server ID. This must be unique among different server instances, // but the same across all RPC's made to a particular server instance. @@ -118,81 +118,81 @@ message SimpleResponse { // Server hostname. string hostname = 6; -} - -// Client-streaming request. -message StreamingInputCallRequest { - // Optional input payload sent along with the request. - Payload payload = 1; - - // Whether the server should expect this request to be compressed. This field - // is "nullable" in order to interoperate seamlessly with servers not able to - // implement the full compression tests by introspecting the call to verify - // the request's compression status. - BoolValue expect_compressed = 2; - - // Not expecting any payload from the response. -} - -// Client-streaming response. -message StreamingInputCallResponse { - // Aggregated size of payloads received from the client. - int32 aggregated_payload_size = 1; -} - -// Configuration for a particular response. -message ResponseParameters { - // Desired payload sizes in responses from the server. - int32 size = 1; - - // Desired interval between consecutive responses in the response stream in - // microseconds. - int32 interval_us = 2; - - // Whether to request the server to compress the response. This field is - // "nullable" in order to interoperate seamlessly with clients not able to - // implement the full compression tests by introspecting the call to verify - // the response's compression status. - BoolValue compressed = 3; -} - -// 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. - PayloadType response_type = 1; - - // Configuration for each expected response message. - repeated ResponseParameters response_parameters = 2; - - // Optional input payload sent along with the request. - Payload payload = 3; - - // Whether server should return a given status - EchoStatus response_status = 7; -} - -// Server-streaming response, as configured by the request and parameters. -message StreamingOutputCallResponse { - // Payload to increase response size. - Payload payload = 1; -} - -// For reconnect interop test only. -// Client tells server what reconnection parameters it used. -message ReconnectParams { - int32 max_reconnect_backoff_ms = 1; -} - -// For reconnect interop test only. -// Server tells client whether its reconnects are following the spec and the -// reconnect backoffs it saw. -message ReconnectInfo { - bool passed = 1; - repeated int32 backoff_ms = 2; -} +} + +// Client-streaming request. +message StreamingInputCallRequest { + // Optional input payload sent along with the request. + Payload payload = 1; + + // Whether the server should expect this request to be compressed. This field + // is "nullable" in order to interoperate seamlessly with servers not able to + // implement the full compression tests by introspecting the call to verify + // the request's compression status. + BoolValue expect_compressed = 2; + + // Not expecting any payload from the response. +} + +// Client-streaming response. +message StreamingInputCallResponse { + // Aggregated size of payloads received from the client. + int32 aggregated_payload_size = 1; +} + +// Configuration for a particular response. +message ResponseParameters { + // Desired payload sizes in responses from the server. + int32 size = 1; + + // Desired interval between consecutive responses in the response stream in + // microseconds. + int32 interval_us = 2; + + // Whether to request the server to compress the response. This field is + // "nullable" in order to interoperate seamlessly with clients not able to + // implement the full compression tests by introspecting the call to verify + // the response's compression status. + BoolValue compressed = 3; +} + +// 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. + PayloadType response_type = 1; + + // Configuration for each expected response message. + repeated ResponseParameters response_parameters = 2; + + // Optional input payload sent along with the request. + Payload payload = 3; + + // Whether server should return a given status + EchoStatus response_status = 7; +} + +// Server-streaming response, as configured by the request and parameters. +message StreamingOutputCallResponse { + // Payload to increase response size. + Payload payload = 1; +} + +// For reconnect interop test only. +// Client tells server what reconnection parameters it used. +message ReconnectParams { + int32 max_reconnect_backoff_ms = 1; +} + +// For reconnect interop test only. +// Server tells client whether its reconnects are following the spec and the +// reconnect backoffs it saw. +message ReconnectInfo { + bool passed = 1; + repeated int32 backoff_ms = 2; +} message LoadBalancerStatsRequest { // Request stats for the next num_rpcs sent by client. diff --git a/contrib/libs/grpc/src/proto/grpc/testing/metrics.proto b/contrib/libs/grpc/src/proto/grpc/testing/metrics.proto index 6950400643..0b225ffe50 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/metrics.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/metrics.proto @@ -1,49 +1,49 @@ // Copyright 2015-2016 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. - -// Contains the definitions for a metrics service and the type of metrics -// exposed by the service. -// -// Currently, 'Gauge' (i.e a metric that represents the measured value of -// something at an instant of time) is the only metric type supported by the -// service. -syntax = "proto3"; - -package grpc.testing; - + +// Contains the definitions for a metrics service and the type of metrics +// exposed by the service. +// +// Currently, 'Gauge' (i.e a metric that represents the measured value of +// something at an instant of time) is the only metric type supported by the +// service. +syntax = "proto3"; + +package grpc.testing; + // Response message containing the gauge name and value -message GaugeResponse { - string name = 1; - oneof value { - int64 long_value = 2; - double double_value = 3; - string string_value = 4; - } -} - -// Request message containing the gauge name -message GaugeRequest { - string name = 1; -} - -message EmptyMessage {} - -service MetricsService { - // Returns the values of all the gauges that are currently being maintained by - // the service - rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); - - // Returns the value of one gauge - rpc GetGauge(GaugeRequest) returns (GaugeResponse); -} +message GaugeResponse { + string name = 1; + oneof value { + int64 long_value = 2; + double double_value = 3; + string string_value = 4; + } +} + +// Request message containing the gauge name +message GaugeRequest { + string name = 1; +} + +message EmptyMessage {} + +service MetricsService { + // Returns the values of all the gauges that are currently being maintained by + // the service + rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); + + // Returns the value of one gauge + rpc GetGauge(GaugeRequest) returns (GaugeResponse); +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/payloads.proto b/contrib/libs/grpc/src/proto/grpc/testing/payloads.proto index 4feab92eab..cbbc815e4c 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/payloads.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/payloads.proto @@ -1,40 +1,40 @@ // Copyright 2015 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"; - -package grpc.testing; - -message ByteBufferParams { - int32 req_size = 1; - int32 resp_size = 2; -} - -message SimpleProtoParams { - int32 req_size = 1; - int32 resp_size = 2; -} - -message ComplexProtoParams { - // TODO (vpai): Fill this in once the details of complex, representative - // protos are decided -} - -message PayloadConfig { - oneof payload { - ByteBufferParams bytebuf_params = 1; - SimpleProtoParams simple_params = 2; - ComplexProtoParams complex_params = 3; - } -} + +syntax = "proto3"; + +package grpc.testing; + +message ByteBufferParams { + int32 req_size = 1; + int32 resp_size = 2; +} + +message SimpleProtoParams { + int32 req_size = 1; + int32 resp_size = 2; +} + +message ComplexProtoParams { + // TODO (vpai): Fill this in once the details of complex, representative + // protos are decided +} + +message PayloadConfig { + oneof payload { + ByteBufferParams bytebuf_params = 1; + SimpleProtoParams simple_params = 2; + ComplexProtoParams complex_params = 3; + } +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2.proto b/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2.proto index 666862e6c2..e02f336874 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2.proto @@ -1,22 +1,22 @@ - + // Copyright 2016 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 = "proto2"; - -package grpc.testing.proto2; - -message EmptyWithExtensions { - extensions 100 to 999; -} + +syntax = "proto2"; + +package grpc.testing.proto2; + +message EmptyWithExtensions { + extensions 100 to 999; +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2_extensions.proto b/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2_extensions.proto index fca59f68c9..d9e7f71451 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2_extensions.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/proto2/empty2_extensions.proto @@ -1,28 +1,28 @@ // Copyright 2016 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 = "proto2"; - -import "src/proto/grpc/testing/proto2/empty2.proto"; - -package grpc.testing.proto2; - -// Fill emptiness with music. -extend grpc.testing.proto2.EmptyWithExtensions { - optional int64 Deadmau5 = 124; - optional float Madeon = 125; - optional string AboveAndBeyond = 126; - optional bool Tycho = 127; - optional fixed64 Pendulum = 128; -} + +syntax = "proto2"; + +import "src/proto/grpc/testing/proto2/empty2.proto"; + +package grpc.testing.proto2; + +// Fill emptiness with music. +extend grpc.testing.proto2.EmptyWithExtensions { + optional int64 Deadmau5 = 124; + optional float Madeon = 125; + optional string AboveAndBeyond = 126; + optional bool Tycho = 127; + optional fixed64 Pendulum = 128; +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/stats.proto b/contrib/libs/grpc/src/proto/grpc/testing/stats.proto index a0f84ddbce..0bf9be7a9e 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/stats.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/stats.proto @@ -1,83 +1,83 @@ // Copyright 2015 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"; - -package grpc.testing; - + +syntax = "proto3"; + +package grpc.testing; + import "src/proto/grpc/core/stats.proto"; -message ServerStats { - // wall clock time change in seconds since last reset - double time_elapsed = 1; - - // change in user time (in seconds) used by the server since last reset - double time_user = 2; - - // change in server time (in seconds) used by the server process and all - // threads since last reset - double time_system = 3; - - // change in total cpu time of the server (data from proc/stat) - uint64 total_cpu_time = 4; - - // change in idle time of the server (data from proc/stat) - uint64 idle_cpu_time = 5; +message ServerStats { + // wall clock time change in seconds since last reset + double time_elapsed = 1; + + // change in user time (in seconds) used by the server since last reset + double time_user = 2; + + // change in server time (in seconds) used by the server process and all + // threads since last reset + double time_system = 3; + + // change in total cpu time of the server (data from proc/stat) + uint64 total_cpu_time = 4; + + // change in idle time of the server (data from proc/stat) + uint64 idle_cpu_time = 5; // Number of polls called inside completion queue uint64 cq_poll_count = 6; // Core library stats grpc.core.Stats core_stats = 7; -} - -// Histogram params based on grpc/support/histogram.c -message HistogramParams { - double resolution = 1; // first bucket is [0, 1 + resolution) - double max_possible = 2; // use enough buckets to allow this value -} - -// Histogram data based on grpc/support/histogram.c -message HistogramData { - repeated uint32 bucket = 1; - double min_seen = 2; - double max_seen = 3; - double sum = 4; - double sum_of_squares = 5; - double count = 6; -} - -message RequestResultCount { - int32 status_code = 1; - int64 count = 2; -} - -message ClientStats { - // Latency histogram. Data points are in nanoseconds. - HistogramData latencies = 1; - - // See ServerStats for details. - double time_elapsed = 2; - double time_user = 3; - double time_system = 4; - - // Number of failed requests (one row per status code seen) - repeated RequestResultCount request_results = 5; +} + +// Histogram params based on grpc/support/histogram.c +message HistogramParams { + double resolution = 1; // first bucket is [0, 1 + resolution) + double max_possible = 2; // use enough buckets to allow this value +} + +// Histogram data based on grpc/support/histogram.c +message HistogramData { + repeated uint32 bucket = 1; + double min_seen = 2; + double max_seen = 3; + double sum = 4; + double sum_of_squares = 5; + double count = 6; +} + +message RequestResultCount { + int32 status_code = 1; + int64 count = 2; +} + +message ClientStats { + // Latency histogram. Data points are in nanoseconds. + HistogramData latencies = 1; + + // See ServerStats for details. + double time_elapsed = 2; + double time_user = 3; + double time_system = 4; + + // Number of failed requests (one row per status code seen) + repeated RequestResultCount request_results = 5; // Number of polls called inside completion queue uint64 cq_poll_count = 6; // Core library stats grpc.core.Stats core_stats = 7; -} +} diff --git a/contrib/libs/grpc/src/proto/grpc/testing/test.proto b/contrib/libs/grpc/src/proto/grpc/testing/test.proto index 1da43f4898..7cf561f7d3 100644 --- a/contrib/libs/grpc/src/proto/grpc/testing/test.proto +++ b/contrib/libs/grpc/src/proto/grpc/testing/test.proto @@ -1,82 +1,82 @@ - + // Copyright 2015-2016 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. - -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. - -syntax = "proto3"; - -import "src/proto/grpc/testing/empty.proto"; -import "src/proto/grpc/testing/messages.proto"; - -package grpc.testing; - -// A simple service to test the various types of RPCs and experiment with -// performance with various types of payload. -service TestService { - // One empty request followed by one empty response. - rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty); - - // One request followed by one response. - rpc UnaryCall(SimpleRequest) returns (SimpleResponse); - - // One request followed by one response. Response has cache control - // headers set such that a caching HTTP proxy (such as GFE) can - // satisfy subsequent requests. - rpc CacheableUnaryCall(SimpleRequest) returns (SimpleResponse); - - // One request followed by a sequence of responses (streamed download). - // The server returns the payload with client desired type and sizes. - rpc StreamingOutputCall(StreamingOutputCallRequest) - returns (stream StreamingOutputCallResponse); - - // A sequence of requests followed by one response (streamed upload). - // The server returns the aggregated size of client payload as the result. - rpc StreamingInputCall(stream StreamingInputCallRequest) - returns (StreamingInputCallResponse); - - // A sequence of requests with each request served by the server immediately. - // As one request could lead to multiple responses, this interface - // demonstrates the idea of full duplexing. - rpc FullDuplexCall(stream StreamingOutputCallRequest) - returns (stream StreamingOutputCallResponse); - - // A sequence of requests followed by a sequence of responses. - // The server buffers all the client requests and then serves them in order. A - // stream of responses are returned to the client when the server starts with - // first request. - rpc HalfDuplexCall(stream StreamingOutputCallRequest) - returns (stream StreamingOutputCallResponse); - - // The test server will not implement this method. It will be used - // to test the behavior when clients call unimplemented methods. - rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); -} - -// A simple service NOT implemented at servers so clients can test for -// that case. -service UnimplementedService { - // A call that no server should implement - rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); -} - -// A service used to control reconnect server. -service ReconnectService { - rpc Start(grpc.testing.ReconnectParams) returns (grpc.testing.Empty); - rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo); -} + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. + +syntax = "proto3"; + +import "src/proto/grpc/testing/empty.proto"; +import "src/proto/grpc/testing/messages.proto"; + +package grpc.testing; + +// A simple service to test the various types of RPCs and experiment with +// performance with various types of payload. +service TestService { + // One empty request followed by one empty response. + rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty); + + // One request followed by one response. + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // One request followed by one response. Response has cache control + // headers set such that a caching HTTP proxy (such as GFE) can + // satisfy subsequent requests. + rpc CacheableUnaryCall(SimpleRequest) returns (SimpleResponse); + + // One request followed by a sequence of responses (streamed download). + // The server returns the payload with client desired type and sizes. + rpc StreamingOutputCall(StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); + + // A sequence of requests followed by one response (streamed upload). + // The server returns the aggregated size of client payload as the result. + rpc StreamingInputCall(stream StreamingInputCallRequest) + returns (StreamingInputCallResponse); + + // A sequence of requests with each request served by the server immediately. + // As one request could lead to multiple responses, this interface + // demonstrates the idea of full duplexing. + rpc FullDuplexCall(stream StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); + + // A sequence of requests followed by a sequence of responses. + // The server buffers all the client requests and then serves them in order. A + // stream of responses are returned to the client when the server starts with + // first request. + rpc HalfDuplexCall(stream StreamingOutputCallRequest) + returns (stream StreamingOutputCallResponse); + + // The test server will not implement this method. It will be used + // to test the behavior when clients call unimplemented methods. + rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); +} + +// A simple service NOT implemented at servers so clients can test for +// that case. +service UnimplementedService { + // A call that no server should implement + rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty); +} + +// A service used to control reconnect server. +service ReconnectService { + rpc Start(grpc.testing.ReconnectParams) returns (grpc.testing.Empty); + rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo); +} // A service used to obtain stats for verifying LB behavior. service LoadBalancerStatsService { diff --git a/contrib/libs/grpc/src/proto/math/math.proto b/contrib/libs/grpc/src/proto/math/math.proto index e60ba0d7cd..e72270310a 100644 --- a/contrib/libs/grpc/src/proto/math/math.proto +++ b/contrib/libs/grpc/src/proto/math/math.proto @@ -1,65 +1,65 @@ - + // Copyright 2015 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"; - -package math; - -message DivArgs { - int64 dividend = 1; - int64 divisor = 2; -} - -message DivReply { - int64 quotient = 1; - int64 remainder = 2; -} - -message FibArgs { - int64 limit = 1; -} - -message Num { - int64 num = 1; -} - -message FibReply { - int64 count = 1; -} - -service Math { - // Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - // and remainder. - rpc Div (DivArgs) returns (DivReply) { - } - - // DivMany accepts an arbitrary number of division args from the client stream - // and sends back the results in the reply stream. The stream continues until - // the client closes its end; the server does the same after sending all the - // replies. The stream ends immediately if either end aborts. - rpc DivMany (stream DivArgs) returns (stream DivReply) { - } - - // Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib - // generates up to limit numbers; otherwise it continues until the call is - // canceled. Unlike Fib above, Fib has no final FibReply. - rpc Fib (FibArgs) returns (stream Num) { - } - - // Sum sums a stream of numbers, returning the final result once the stream - // is closed. - rpc Sum (stream Num) returns (Num) { - } -} + +syntax = "proto3"; + +package math; + +message DivArgs { + int64 dividend = 1; + int64 divisor = 2; +} + +message DivReply { + int64 quotient = 1; + int64 remainder = 2; +} + +message FibArgs { + int64 limit = 1; +} + +message Num { + int64 num = 1; +} + +message FibReply { + int64 count = 1; +} + +service Math { + // Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + // and remainder. + rpc Div (DivArgs) returns (DivReply) { + } + + // DivMany accepts an arbitrary number of division args from the client stream + // and sends back the results in the reply stream. The stream continues until + // the client closes its end; the server does the same after sending all the + // replies. The stream ends immediately if either end aborts. + rpc DivMany (stream DivArgs) returns (stream DivReply) { + } + + // Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib + // generates up to limit numbers; otherwise it continues until the call is + // canceled. Unlike Fib above, Fib has no final FibReply. + rpc Fib (FibArgs) returns (stream Num) { + } + + // Sum sums a stream of numbers, returning the final result once the stream + // is closed. + rpc Sum (stream Num) returns (Num) { + } +} |