Merge github.com:grpc/grpc into new_transport_op

pull/10387/head
Craig Tiller 8 years ago
commit 7d882d7839
  1. 2
      .gitignore
  2. 44
      CMakeLists.txt
  3. 52
      Makefile
  4. 24
      build.yaml
  5. 16
      doc/status_ordering.md
  6. 2
      gRPC-Core.podspec
  7. 2
      gRPC-ProtoRPC.podspec
  8. 2
      gRPC-RxLibrary.podspec
  9. 2
      gRPC.podspec
  10. 2
      package.json
  11. 4
      package.xml
  12. 5
      src/core/ext/client_channel/parse_address.c
  13. 8
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  14. 2
      src/core/ext/transport/chttp2/transport/frame_ping.c
  15. 130
      src/core/ext/transport/cronet/transport/cronet_transport.c
  16. 22
      src/core/lib/iomgr/pollset_uv.c
  17. 52
      src/core/lib/iomgr/resolve_address_uv.c
  18. 1
      src/core/lib/iomgr/tcp_client_uv.c
  19. 2
      src/core/lib/iomgr/wakeup_fd_posix.h
  20. 2
      src/cpp/common/version_cc.cc
  21. 4
      src/csharp/Grpc.Auth/project.json
  22. 4
      src/csharp/Grpc.Core.Testing/project.json
  23. 4
      src/csharp/Grpc.Core/VersionInfo.cs
  24. 2
      src/csharp/Grpc.Core/project.json
  25. 4
      src/csharp/Grpc.HealthCheck/project.json
  26. 4
      src/csharp/Grpc.Reflection/project.json
  27. 2
      src/csharp/build_packages_dotnetcli.bat
  28. 4
      src/csharp/build_packages_dotnetcli.sh
  29. 4
      src/node/health_check/package.json
  30. 2
      src/node/src/server.js
  31. 2
      src/node/tools/package.json
  32. 2
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  33. 2
      src/objective-c/GRPCClient/private/version.h
  34. 9
      src/objective-c/tests/InteropTests.m
  35. 6
      src/objective-c/tests/InteropTestsLocalCleartext.m
  36. 6
      src/objective-c/tests/InteropTestsLocalSSL.m
  37. 6
      src/objective-c/tests/InteropTestsRemote.m
  38. 8
      src/objective-c/tests/InteropTestsRemoteWithCronet/InteropTestsRemoteWithCronet.m
  39. 2
      src/php/composer.json
  40. 166
      src/php/tests/qps/client.php
  41. 11
      src/php/tests/qps/composer.json
  42. 127
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Control.php
  43. 69
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  44. 37
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Payloads.php
  45. 34
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/ProxyService.php
  46. 45
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Services.php
  47. 44
      src/php/tests/qps/generated_code/GPBMetadata/Src/Proto/Grpc/Testing/Stats.php
  48. 78
      src/php/tests/qps/generated_code/Grpc/Testing/BenchmarkServiceClient.php
  49. 62
      src/php/tests/qps/generated_code/Grpc/Testing/BoolValue.php
  50. 65
      src/php/tests/qps/generated_code/Grpc/Testing/ByteBufferParams.php
  51. 84
      src/php/tests/qps/generated_code/Grpc/Testing/ChannelArg.php
  52. 63
      src/php/tests/qps/generated_code/Grpc/Testing/ClientArgs.php
  53. 407
      src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php
  54. 164
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStats.php
  55. 44
      src/php/tests/qps/generated_code/Grpc/Testing/ClientStatus.php
  56. 34
      src/php/tests/qps/generated_code/Grpc/Testing/ClientType.php
  57. 28
      src/php/tests/qps/generated_code/Grpc/Testing/ClosedLoopParams.php
  58. 28
      src/php/tests/qps/generated_code/Grpc/Testing/ComplexProtoParams.php
  59. 23
      src/php/tests/qps/generated_code/Grpc/Testing/CoreRequest.php
  60. 56
      src/php/tests/qps/generated_code/Grpc/Testing/CoreResponse.php
  61. 70
      src/php/tests/qps/generated_code/Grpc/Testing/EchoStatus.php
  62. 153
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramData.php
  63. 93
      src/php/tests/qps/generated_code/Grpc/Testing/HistogramParams.php
  64. 63
      src/php/tests/qps/generated_code/Grpc/Testing/LoadParams.php
  65. 60
      src/php/tests/qps/generated_code/Grpc/Testing/Mark.php
  66. 96
      src/php/tests/qps/generated_code/Grpc/Testing/Payload.php
  67. 80
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadConfig.php
  68. 26
      src/php/tests/qps/generated_code/Grpc/Testing/PayloadType.php
  69. 61
      src/php/tests/qps/generated_code/Grpc/Testing/PoissonParams.php
  70. 72
      src/php/tests/qps/generated_code/Grpc/Testing/ProxyClientServiceClient.php
  71. 44
      src/php/tests/qps/generated_code/Grpc/Testing/ProxyStat.php
  72. 71
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectInfo.php
  73. 49
      src/php/tests/qps/generated_code/Grpc/Testing/ReconnectParams.php
  74. 65
      src/php/tests/qps/generated_code/Grpc/Testing/RequestResultCount.php
  75. 138
      src/php/tests/qps/generated_code/Grpc/Testing/ResponseParameters.php
  76. 21
      src/php/tests/qps/generated_code/Grpc/Testing/RpcType.php
  77. 291
      src/php/tests/qps/generated_code/Grpc/Testing/Scenario.php
  78. 312
      src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResult.php
  79. 430
      src/php/tests/qps/generated_code/Grpc/Testing/ScenarioResultSummary.php
  80. 48
      src/php/tests/qps/generated_code/Grpc/Testing/Scenarios.php
  81. 69
      src/php/tests/qps/generated_code/Grpc/Testing/SecurityParams.php
  82. 63
      src/php/tests/qps/generated_code/Grpc/Testing/ServerArgs.php
  83. 305
      src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.php
  84. 191
      src/php/tests/qps/generated_code/Grpc/Testing/ServerStats.php
  85. 110
      src/php/tests/qps/generated_code/Grpc/Testing/ServerStatus.php
  86. 33
      src/php/tests/qps/generated_code/Grpc/Testing/ServerType.php
  87. 65
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleProtoParams.php
  88. 306
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php
  89. 129
      src/php/tests/qps/generated_code/Grpc/Testing/SimpleResponse.php
  90. 102
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallRequest.php
  91. 60
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingInputCallResponse.php
  92. 171
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallRequest.php
  93. 60
      src/php/tests/qps/generated_code/Grpc/Testing/StreamingOutputCallResponse.php
  94. 23
      src/php/tests/qps/generated_code/Grpc/Testing/Void.php
  95. 111
      src/php/tests/qps/generated_code/Grpc/Testing/WorkerServiceClient.php
  96. 44
      src/proto/grpc/testing/proxy-service.proto
  97. 2
      src/python/grpcio/grpc_version.py
  98. 2
      src/python/grpcio_health_checking/grpc_version.py
  99. 2
      src/python/grpcio_reflection/grpc_version.py
  100. 2
      src/python/grpcio_tests/grpc_version.py
  101. Some files were not shown because too many files have changed in this diff Show More

2
.gitignore vendored

@ -8,7 +8,7 @@ objs
# Python items
cython_debug/
python_build/
python_format_venv/
yapf_virtual_environment/
python_pylint_venv/
.coverage*
.eggs

@ -42,7 +42,7 @@
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.2.0-dev")
set(PACKAGE_VERSION "1.3.0-dev")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
@ -603,6 +603,9 @@ endif()
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx bm_metadata)
endif()
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx bm_pollset)
endif()
add_dependencies(buildtests_cxx channel_arguments_test)
add_dependencies(buildtests_cxx channel_filter_test)
add_dependencies(buildtests_cxx cli_call_test)
@ -8011,6 +8014,45 @@ target_link_libraries(bm_metadata
${_gRPC_GFLAGS_LIBRARIES}
)
endif()
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_executable(bm_pollset
test/cpp/microbenchmarks/bm_pollset.cc
third_party/googletest/src/gtest-all.cc
)
target_include_directories(bm_pollset
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
PRIVATE ${BENCHMARK_ROOT_DIR}/include
PRIVATE ${ZLIB_ROOT_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
PRIVATE third_party/googletest/include
PRIVATE third_party/googletest
PRIVATE ${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(bm_pollset
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_benchmark
benchmark
grpc++_test_util
grpc_test_util
grpc++
grpc
gpr_test_util
gpr
${_gRPC_GFLAGS_LIBRARIES}
)
endif()
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)

@ -412,8 +412,8 @@ Q = @
endif
CORE_VERSION = 3.0.0-dev
CPP_VERSION = 1.2.0-dev
CSHARP_VERSION = 1.2.0-dev
CPP_VERSION = 1.3.0-dev
CSHARP_VERSION = 1.3.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@ -1057,6 +1057,7 @@ bm_fullstack_streaming_pump: $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump
bm_fullstack_trickle: $(BINDIR)/$(CONFIG)/bm_fullstack_trickle
bm_fullstack_unary_ping_pong: $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong
bm_metadata: $(BINDIR)/$(CONFIG)/bm_metadata
bm_pollset: $(BINDIR)/$(CONFIG)/bm_pollset
channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test
channel_filter_test: $(BINDIR)/$(CONFIG)/channel_filter_test
cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test
@ -1478,6 +1479,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/bm_fullstack_trickle \
$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong \
$(BINDIR)/$(CONFIG)/bm_metadata \
$(BINDIR)/$(CONFIG)/bm_pollset \
$(BINDIR)/$(CONFIG)/channel_arguments_test \
$(BINDIR)/$(CONFIG)/channel_filter_test \
$(BINDIR)/$(CONFIG)/cli_call_test \
@ -1593,6 +1595,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/bm_fullstack_trickle \
$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong \
$(BINDIR)/$(CONFIG)/bm_metadata \
$(BINDIR)/$(CONFIG)/bm_pollset \
$(BINDIR)/$(CONFIG)/channel_arguments_test \
$(BINDIR)/$(CONFIG)/channel_filter_test \
$(BINDIR)/$(CONFIG)/cli_call_test \
@ -1943,6 +1946,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong || ( echo test bm_fullstack_unary_ping_pong failed ; exit 1 )
$(E) "[RUN] Testing bm_metadata"
$(Q) $(BINDIR)/$(CONFIG)/bm_metadata || ( echo test bm_metadata failed ; exit 1 )
$(E) "[RUN] Testing bm_pollset"
$(Q) $(BINDIR)/$(CONFIG)/bm_pollset || ( echo test bm_pollset failed ; exit 1 )
$(E) "[RUN] Testing channel_arguments_test"
$(Q) $(BINDIR)/$(CONFIG)/channel_arguments_test || ( echo test channel_arguments_test failed ; exit 1 )
$(E) "[RUN] Testing channel_filter_test"
@ -13069,6 +13074,49 @@ endif
endif
BM_POLLSET_SRC = \
test/cpp/microbenchmarks/bm_pollset.cc \
BM_POLLSET_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BM_POLLSET_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/bm_pollset: openssl_dep_error
else
ifeq ($(NO_PROTOBUF),true)
# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
$(BINDIR)/$(CONFIG)/bm_pollset: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/bm_pollset: $(PROTOBUF_DEP) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_pollset
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_pollset.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_bm_pollset: $(BM_POLLSET_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(BM_POLLSET_OBJS:.o=.dep)
endif
endif
CHANNEL_ARGUMENTS_TEST_SRC = \
test/cpp/common/channel_arguments_test.cc \

@ -14,7 +14,7 @@ settings:
'#10': See the expand_version.py for all the quirks here
core_version: 3.0.0-dev
g_stands_for: green
version: 1.2.0-dev
version: 1.3.0-dev
filegroups:
- name: census
public_headers:
@ -2589,6 +2589,8 @@ targets:
- grpc
- gpr_test_util
- gpr
exclude_iomgrs:
- uv
platforms:
- mac
- linux
@ -3268,6 +3270,26 @@ targets:
- mac
- linux
- posix
- name: bm_pollset
build: test
language: c++
src:
- test/cpp/microbenchmarks/bm_pollset.cc
deps:
- grpc_benchmark
- benchmark
- grpc++_test_util
- grpc_test_util
- grpc++
- grpc
- gpr_test_util
- gpr
args:
- --benchmark_min_time=0
platforms:
- mac
- linux
- posix
- name: channel_arguments_test
gtest: true
build: test

@ -0,0 +1,16 @@
Ordering Status and Reads in the gRPC API
-----------------------------------------
Rules for implementors:
1. Reads and Writes Must not succeed after Status has been delivered.
2. OK Status is only delivered after all buffered messages are read.
3. Reads May continue to succeed after a failing write.
However, once a write fails, all subsequent writes Must fail,
and similarly, once a read fails, all subsequent reads Must fail.
4. When an error status is known to the library, if the user asks for status,
the library Should discard messages received in the library but not delivered
to the user and then deliver the status. If the user does not ask for status
but continues reading, the library Should deliver buffered messages before
delivering status. The library MAY choose to implement the stricter version
where errors cause all buffered messages to be dropped, but this is not a
requirement.

@ -37,7 +37,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.2.0-dev'
version = '1.3.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'http://www.grpc.io'

@ -36,7 +36,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.2.0-dev'
version = '1.3.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'http://www.grpc.io'

@ -36,7 +36,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.2.0-dev'
version = '1.3.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'http://www.grpc.io'

@ -35,7 +35,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.2.0-dev'
version = '1.3.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'http://www.grpc.io'

@ -1,6 +1,6 @@
{
"name": "grpc",
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "http://www.grpc.io/",

@ -13,8 +13,8 @@
<date>2017-03-01</date>
<time>16:06:07</time>
<version>
<release>1.2.0dev</release>
<api>1.2.0dev</api>
<release>1.3.0dev</release>
<api>1.3.0dev</api>
</version>
<stability>
<release>beta</release>

@ -128,6 +128,7 @@ int parse_ipv6(grpc_uri *uri, grpc_resolved_address *resolved_addr) {
GPR_ASSERT(host_end >= host);
char host_without_scope[INET6_ADDRSTRLEN];
size_t host_without_scope_len = (size_t)(host_end - host);
uint32_t sin6_scope_id = 0;
strncpy(host_without_scope, host, host_without_scope_len);
host_without_scope[host_without_scope_len] = '\0';
if (inet_pton(AF_INET6, host_without_scope, &in6->sin6_addr) == 0) {
@ -136,10 +137,12 @@ int parse_ipv6(grpc_uri *uri, grpc_resolved_address *resolved_addr) {
}
if (gpr_parse_bytes_to_uint32(host_end + 1,
strlen(host) - host_without_scope_len - 1,
&in6->sin6_scope_id) == 0) {
&sin6_scope_id) == 0) {
gpr_log(GPR_ERROR, "invalid ipv6 scope id: '%s'", host_end + 1);
goto done;
}
// Handle "sin6_scope_id" being type "u_long". See grpc issue ##10027.
in6->sin6_scope_id = sin6_scope_id;
} else {
if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) {
gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host);

@ -511,6 +511,10 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport *t,
grpc_error *error) {
if (!t->closed) {
if (!grpc_error_has_clear_grpc_status(error)) {
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
}
if (t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE) {
if (t->close_transport_on_writes_finished == NULL) {
t->close_transport_on_writes_finished =
@ -520,10 +524,6 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx,
grpc_error_add_child(t->close_transport_on_writes_finished, error);
return;
}
if (!grpc_error_has_clear_grpc_status(error)) {
error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
}
t->closed = 1;
connectivity_state_set(exec_ctx, t, GRPC_CHANNEL_SHUTDOWN,
GRPC_ERROR_REF(error), "close_transport");

@ -91,7 +91,7 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser,
grpc_chttp2_ping_parser *p = parser;
while (p->byte != 8 && cur != end) {
p->opaque_8bytes |= (((uint64_t)*cur) << (8 * p->byte));
p->opaque_8bytes |= (((uint64_t)*cur) << (56 - 8 * p->byte));
cur++;
p->byte++;
}

@ -54,6 +54,7 @@
#include "third_party/objective_c/Cronet/bidirectional_stream_c.h"
#define GRPC_HEADER_SIZE_IN_BYTES 5
#define GRPC_FLUSH_READ_SIZE 4096
#define CRONET_LOG(...) \
do { \
@ -151,11 +152,17 @@ struct write_state {
struct op_state {
bool state_op_done[OP_NUM_OPS];
bool state_callback_received[OP_NUM_OPS];
/* A non-zero gRPC status code has been seen */
bool fail_state;
/* Transport is discarding all buffered messages */
bool flush_read;
bool flush_cronet_when_ready;
bool pending_write_for_trailer;
bool unprocessed_send_message;
bool pending_send_message;
/* User requested RECV_TRAILING_METADATA */
bool pending_recv_trailing_metadata;
/* Cronet has not issued a callback of a bidirectional read */
bool pending_read_from_cronet;
grpc_error *cancel_error;
/* data structure for storing data coming from server */
struct read_state rs;
@ -248,11 +255,35 @@ static const char *op_id_string(enum e_op_id i) {
return "UNKNOWN";
}
static void free_read_buffer(stream_obj *s) {
static void null_and_maybe_free_read_buffer(stream_obj *s) {
if (s->state.rs.read_buffer &&
s->state.rs.read_buffer != s->state.rs.grpc_header_bytes) {
gpr_free(s->state.rs.read_buffer);
s->state.rs.read_buffer = NULL;
}
s->state.rs.read_buffer = NULL;
}
static void maybe_flush_read(stream_obj *s) {
/* To enter flush read state (discarding all the buffered messages in
* transport layer), two conditions must be satisfied: 1) non-zero grpc status
* has been received, and 2) an op requesting the status code
* (RECV_TRAILING_METADATA) is issued by the user. (See
* doc/status_ordering.md) */
/* Whenever the evaluation of any of the two condition is changed, we check
* whether we should enter the flush read state. */
if (s->state.pending_recv_trailing_metadata && s->state.fail_state) {
if (!s->state.flush_read) {
CRONET_LOG(GPR_DEBUG, "%p: Flush read", s);
s->state.flush_read = true;
null_and_maybe_free_read_buffer(s);
s->state.rs.read_buffer = gpr_malloc(GRPC_FLUSH_READ_SIZE);
if (!s->state.pending_read_from_cronet) {
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
bidirectional_stream_read(s->cbs, s->state.rs.read_buffer,
GRPC_FLUSH_READ_SIZE);
s->state.pending_read_from_cronet = true;
}
}
}
}
@ -279,7 +310,11 @@ static void add_to_storage(struct stream_obj *s, grpc_transport_stream_op *op) {
storage->head = new_op;
storage->num_pending_ops++;
if (op->send_message) {
s->state.unprocessed_send_message = true;
s->state.pending_send_message = true;
}
if (op->recv_trailing_metadata) {
s->state.pending_recv_trailing_metadata = true;
maybe_flush_read(s);
}
CRONET_LOG(GPR_DEBUG, "adding new op %p. %d in the queue.", new_op,
storage->num_pending_ops);
@ -367,7 +402,7 @@ static void on_failed(bidirectional_stream *stream, int net_error) {
gpr_free(s->state.ws.write_buffer);
s->state.ws.write_buffer = NULL;
}
free_read_buffer(s);
null_and_maybe_free_read_buffer(s);
gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@ -390,7 +425,7 @@ static void on_canceled(bidirectional_stream *stream) {
gpr_free(s->state.ws.write_buffer);
s->state.ws.write_buffer = NULL;
}
free_read_buffer(s);
null_and_maybe_free_read_buffer(s);
gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@ -405,7 +440,7 @@ static void on_succeeded(bidirectional_stream *stream) {
bidirectional_stream_destroy(s->cbs);
s->state.state_callback_received[OP_SUCCEEDED] = true;
s->cbs = NULL;
free_read_buffer(s);
null_and_maybe_free_read_buffer(s);
gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@ -473,6 +508,7 @@ static void on_response_headers_received(
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
bidirectional_stream_read(s->cbs, s->state.rs.read_buffer,
s->state.rs.remaining_bytes);
s->state.pending_read_from_cronet = true;
}
gpr_mu_unlock(&s->mu);
grpc_exec_ctx_finish(&exec_ctx);
@ -504,10 +540,13 @@ static void on_read_completed(bidirectional_stream *stream, char *data,
CRONET_LOG(GPR_DEBUG, "R: on_read_completed(%p, %p, %d)", stream, data,
count);
gpr_mu_lock(&s->mu);
s->state.pending_read_from_cronet = false;
s->state.state_callback_received[OP_RECV_MESSAGE] = true;
if (count > 0 && s->state.flush_read) {
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
bidirectional_stream_read(s->cbs, s->state.rs.read_buffer, 4096);
bidirectional_stream_read(s->cbs, s->state.rs.read_buffer,
GRPC_FLUSH_READ_SIZE);
s->state.pending_read_from_cronet = true;
gpr_mu_unlock(&s->mu);
} else if (count > 0) {
s->state.rs.received_bytes += count;
@ -518,16 +557,14 @@ static void on_read_completed(bidirectional_stream *stream, char *data,
bidirectional_stream_read(
s->cbs, s->state.rs.read_buffer + s->state.rs.received_bytes,
s->state.rs.remaining_bytes);
s->state.pending_read_from_cronet = true;
gpr_mu_unlock(&s->mu);
} else {
gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
} else {
if (s->state.flush_read) {
gpr_free(s->state.rs.read_buffer);
s->state.rs.read_buffer = NULL;
}
null_and_maybe_free_read_buffer(s);
s->state.rs.read_stream_closed = true;
gpr_mu_unlock(&s->mu);
execute_from_storage(s);
@ -564,6 +601,7 @@ static void on_response_trailers_received(
if (0 == strcmp(trailers->headers[i].key, "grpc-status") &&
0 != strcmp(trailers->headers[i].value, "0")) {
s->state.fail_state = true;
maybe_flush_read(s);
}
}
s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true;
@ -778,7 +816,7 @@ static bool op_can_be_run(grpc_transport_stream_op *curr_op,
else if (!stream_state->state_callback_received[OP_SEND_INITIAL_METADATA])
result = false;
/* we haven't sent message yet */
else if (stream_state->unprocessed_send_message &&
else if (stream_state->pending_send_message &&
!stream_state->state_op_done[OP_SEND_MESSAGE])
result = false;
/* we haven't got on_write_completed for the send yet */
@ -900,7 +938,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
} else if (stream_op->send_message &&
op_can_be_run(stream_op, s, &oas->state, OP_SEND_MESSAGE)) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_MESSAGE", oas);
stream_state->unprocessed_send_message = false;
stream_state->pending_send_message = false;
if (stream_state->state_callback_received[OP_FAILED]) {
result = NO_ACTION_POSSIBLE;
CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed.");
@ -1009,6 +1047,13 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
stream_state->state_op_done[OP_RECV_MESSAGE] = true;
oas->state.state_op_done[OP_RECV_MESSAGE] = true;
result = ACTION_TAKEN_NO_CALLBACK;
} else if (stream_state->flush_read) {
CRONET_LOG(GPR_DEBUG, "flush read");
grpc_closure_sched(exec_ctx, stream_op->recv_message_ready,
GRPC_ERROR_NONE);
stream_state->state_op_done[OP_RECV_MESSAGE] = true;
oas->state.state_op_done[OP_RECV_MESSAGE] = true;
result = ACTION_TAKEN_NO_CALLBACK;
} else if (stream_state->rs.length_field_received == false) {
if (stream_state->rs.received_bytes == GRPC_HEADER_SIZE_IN_BYTES &&
stream_state->rs.remaining_bytes == 0) {
@ -1029,6 +1074,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
true; /* Indicates that at least one read request has been made */
bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer,
stream_state->rs.remaining_bytes);
stream_state->pending_read_from_cronet = true;
result = ACTION_TAKEN_WITH_CALLBACK;
} else {
stream_state->rs.remaining_bytes = 0;
@ -1047,11 +1093,13 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
stream_state->rs.read_buffer = stream_state->rs.grpc_header_bytes;
stream_state->rs.remaining_bytes = GRPC_HEADER_SIZE_IN_BYTES;
stream_state->rs.received_bytes = 0;
stream_state->rs.length_field_received = false;
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
stream_state->state_op_done[OP_READ_REQ_MADE] =
true; /* Indicates that at least one read request has been made */
bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer,
stream_state->rs.remaining_bytes);
stream_state->pending_read_from_cronet = true;
result = ACTION_TAKEN_NO_CALLBACK;
}
} else if (stream_state->rs.remaining_bytes == 0) {
@ -1064,6 +1112,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
true; /* Indicates that at least one read request has been made */
bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer,
stream_state->rs.remaining_bytes);
stream_state->pending_read_from_cronet = true;
result = ACTION_TAKEN_WITH_CALLBACK;
} else {
result = NO_ACTION_POSSIBLE;
@ -1075,7 +1124,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
uint8_t *dst_p = GRPC_SLICE_START_PTR(read_data_slice);
memcpy(dst_p, stream_state->rs.read_buffer,
(size_t)stream_state->rs.length_field);
free_read_buffer(s);
null_and_maybe_free_read_buffer(s);
grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer);
grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer,
read_data_slice);
@ -1096,6 +1145,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer,
stream_state->rs.remaining_bytes);
stream_state->pending_read_from_cronet = true;
result = ACTION_TAKEN_NO_CALLBACK;
}
} else if (stream_op->recv_trailing_metadata &&
@ -1153,15 +1203,6 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
make a note */
if (stream_op->recv_message)
stream_state->state_op_done[OP_RECV_MESSAGE_AND_ON_COMPLETE] = true;
} else if (stream_state->fail_state && !stream_state->flush_read) {
CRONET_LOG(GPR_DEBUG, "running: %p flush read", oas);
if (stream_state->rs.read_buffer &&
stream_state->rs.read_buffer != stream_state->rs.grpc_header_bytes) {
gpr_free(stream_state->rs.read_buffer);
stream_state->rs.read_buffer = NULL;
}
stream_state->rs.read_buffer = gpr_malloc(4096);
stream_state->flush_read = true;
} else {
result = NO_ACTION_POSSIBLE;
}
@ -1190,7 +1231,9 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
s->state.fail_state = s->state.flush_read = false;
s->state.cancel_error = NULL;
s->state.flush_cronet_when_ready = s->state.pending_write_for_trailer = false;
s->state.unprocessed_send_message = false;
s->state.pending_send_message = false;
s->state.pending_recv_trailing_metadata = false;
s->state.pending_read_from_cronet = false;
s->curr_gs = gs;
s->curr_ct = (grpc_cronet_transport *)gt;
@ -1209,37 +1252,30 @@ static void set_pollset_set_do_nothing(grpc_exec_ctx *exec_ctx,
static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_stream *gs, grpc_transport_stream_op *op) {
CRONET_LOG(GPR_DEBUG, "perform_stream_op");
stream_obj *s = (stream_obj *)gs;
add_to_storage(s, op);
if (op->send_initial_metadata &&
header_has_authority(op->send_initial_metadata->list.head)) {
/* Cronet does not support :authority header field. We cancel the call when
this field is present in metadata */
bidirectional_stream_header_array header_array;
bidirectional_stream_header *header;
bidirectional_stream cbs;
CRONET_LOG(GPR_DEBUG,
":authority header is provided but not supported;"
" cancel operations");
/* Notify application that operation is cancelled by forging trailers */
header_array.count = 1;
header_array.capacity = 1;
header_array.headers = gpr_malloc(sizeof(bidirectional_stream_header));
header = (bidirectional_stream_header *)header_array.headers;
header->key = "grpc-status";
header->value = "1"; /* Return status GRPC_STATUS_CANCELLED */
cbs.annotation = (void *)s;
s->state.state_op_done[OP_CANCEL_ERROR] = true;
on_response_trailers_received(&cbs, &header_array);
gpr_free(header_array.headers);
} else {
execute_from_storage(s);
this field is present in metadata */
if (op->recv_initial_metadata_ready) {
grpc_closure_sched(exec_ctx, op->recv_initial_metadata_ready,
GRPC_ERROR_CANCELLED);
}
if (op->recv_message_ready) {
grpc_closure_sched(exec_ctx, op->recv_message_ready,
GRPC_ERROR_CANCELLED);
}
grpc_closure_sched(exec_ctx, op->on_complete, GRPC_ERROR_CANCELLED);
return;
}
stream_obj *s = (stream_obj *)gs;
add_to_storage(s, op);
execute_from_storage(s);
}
static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_stream *gs, void *and_free_memory) {
stream_obj *s = (stream_obj *)gs;
null_and_maybe_free_read_buffer(s);
GRPC_ERROR_UNREF(s->state.cancel_error);
}

@ -39,6 +39,7 @@
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
@ -61,25 +62,30 @@ gpr_mu grpc_polling_mu;
immediately in the next loop iteration.
Note: In the future, if there is a bug that involves missing wakeups in the
future, try adding a uv_async_t to kick the loop differently */
uv_timer_t dummy_uv_handle;
uv_timer_t *dummy_uv_handle;
size_t grpc_pollset_size() { return sizeof(grpc_pollset); }
void dummy_timer_cb(uv_timer_t *handle) {}
void dummy_handle_close_cb(uv_handle_t *handle) { gpr_free(handle); }
void grpc_pollset_global_init(void) {
gpr_mu_init(&grpc_polling_mu);
uv_timer_init(uv_default_loop(), &dummy_uv_handle);
dummy_uv_handle = gpr_malloc(sizeof(uv_timer_t));
uv_timer_init(uv_default_loop(), dummy_uv_handle);
grpc_pollset_work_run_loop = 1;
}
static void timer_close_cb(uv_handle_t *handle) { handle->data = (void *)1; }
void grpc_pollset_global_shutdown(void) {
gpr_mu_destroy(&grpc_polling_mu);
uv_close((uv_handle_t *)&dummy_uv_handle, timer_close_cb);
uv_close((uv_handle_t *)dummy_uv_handle, dummy_handle_close_cb);
}
static void timer_run_cb(uv_timer_t *timer) {}
static void timer_close_cb(uv_handle_t *handle) { handle->data = (void *)1; }
void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
*mu = &grpc_polling_mu;
uv_timer_init(uv_default_loop(), &pollset->timer);
@ -95,7 +101,7 @@ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
uv_run(uv_default_loop(), UV_RUN_NOWAIT);
} else {
// kick the loop once
uv_timer_start(&dummy_uv_handle, dummy_timer_cb, 0, 0);
uv_timer_start(dummy_uv_handle, dummy_timer_cb, 0, 0);
}
grpc_closure_sched(exec_ctx, closure, GRPC_ERROR_NONE);
}
@ -111,8 +117,6 @@ void grpc_pollset_destroy(grpc_pollset *pollset) {
}
}
static void timer_run_cb(uv_timer_t *timer) {}
grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
gpr_timespec now, gpr_timespec deadline) {
@ -145,7 +149,7 @@ grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_error *grpc_pollset_kick(grpc_pollset *pollset,
grpc_pollset_worker *specific_worker) {
uv_timer_start(&dummy_uv_handle, dummy_timer_cb, 0, 0);
uv_timer_start(dummy_uv_handle, dummy_timer_cb, 0, 0);
return GRPC_ERROR_NONE;
}

@ -40,6 +40,7 @@
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
@ -54,8 +55,36 @@ typedef struct request {
grpc_closure *on_done;
grpc_resolved_addresses **addresses;
struct addrinfo *hints;
char *host;
char *port;
} request;
static int retry_named_port_failure(int status, request *r,
uv_getaddrinfo_cb getaddrinfo_cb) {
if (status != 0) {
// This loop is copied from resolve_address_posix.c
char *svc[][2] = {{"http", "80"}, {"https", "443"}};
for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) {
if (strcmp(r->port, svc[i][0]) == 0) {
int retry_status;
uv_getaddrinfo_t *req = gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r;
retry_status = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_cb,
r->host, svc[i][1], r->hints);
if (retry_status < 0 || getaddrinfo_cb == NULL) {
// The callback will not be called
gpr_free(req);
}
return retry_status;
}
}
}
/* If this function calls uv_getaddrinfo, it will return that function's
return value. That function only returns numbers <=0, so we can safely
return 1 to indicate that we never retried */
return 1;
}
static grpc_error *handle_addrinfo_result(int status, struct addrinfo *result,
grpc_resolved_addresses **addresses) {
struct addrinfo *resp;
@ -97,13 +126,21 @@ static void getaddrinfo_callback(uv_getaddrinfo_t *req, int status,
request *r = (request *)req->data;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_error *error;
int retry_status;
gpr_free(req);
retry_status = retry_named_port_failure(status, r, getaddrinfo_callback);
if (retry_status == 0) {
// The request is being retried. Nothing should be done here
return;
}
/* Either no retry was attempted, or the retry failed. Either way, the
original error probably has more interesting information */
error = handle_addrinfo_result(status, res, r->addresses);
grpc_closure_sched(&exec_ctx, r->on_done, error);
grpc_exec_ctx_finish(&exec_ctx);
gpr_free(r->hints);
gpr_free(r);
gpr_free(req);
uv_freeaddrinfo(res);
}
@ -143,6 +180,7 @@ static grpc_error *blocking_resolve_address_impl(
uv_getaddrinfo_t req;
int s;
grpc_error *err;
int retry_status;
req.addrinfo = NULL;
@ -158,6 +196,12 @@ static grpc_error *blocking_resolve_address_impl(
hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
request r = {
.addresses = addresses, .hints = &hints, .host = host, .port = port};
retry_status = retry_named_port_failure(s, &r, NULL);
if (retry_status <= 0) {
s = retry_status;
}
err = handle_addrinfo_result(s, req.addrinfo, addresses);
done:
@ -200,6 +244,8 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
r = gpr_malloc(sizeof(request));
r->on_done = on_done;
r->addresses = addrs;
r->host = host;
r->port = port;
req = gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r;
@ -222,6 +268,8 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
gpr_free(r);
gpr_free(req);
gpr_free(hints);
gpr_free(host);
gpr_free(port);
}
}

@ -76,7 +76,6 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
const char *str = grpc_error_string(error);
gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s",
connect->addr_name, str);
grpc_error_free_string(str);
}
if (error == GRPC_ERROR_NONE) {
/* error == NONE implies that the timer ran out, and wasn't cancelled. If

@ -46,7 +46,7 @@
*
* Setup:
* 1. Before calling anything, call global_init() at least once.
* 1. Call grpc_wakeup_fd_create() to get a wakeup_fd.
* 1. Call grpc_wakeup_fd_init() to set up a wakeup_fd.
* 2. Add the result of GRPC_WAKEUP_FD_FD to the set of monitored file
* descriptors for the poll() style API you are using. Monitor the file
* descriptor for readability.

@ -37,5 +37,5 @@
#include <grpc++/grpc++.h>
namespace grpc {
grpc::string Version() { return "1.2.0-dev"; }
grpc::string Version() { return "1.3.0-dev"; }
}

@ -1,5 +1,5 @@
{
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"title": "gRPC C# Auth",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",
@ -21,7 +21,7 @@
}
},
"dependencies": {
"Grpc.Core": "1.2.0-dev",
"Grpc.Core": "1.3.0-dev",
"Google.Apis.Auth": "1.21.0"
},
"frameworks": {

@ -1,5 +1,5 @@
{
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"title": "gRPC C# Core Testing",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2017, Google Inc.",
@ -21,7 +21,7 @@
}
},
"dependencies": {
"Grpc.Core": "1.2.0-dev"
"Grpc.Core": "1.3.0-dev"
},
"frameworks": {
"net45": {

@ -48,11 +48,11 @@ namespace Grpc.Core
/// <summary>
/// Current <c>AssemblyFileVersion</c> of gRPC C# assemblies
/// </summary>
public const string CurrentAssemblyFileVersion = "1.2.0.0";
public const string CurrentAssemblyFileVersion = "1.3.0.0";
/// <summary>
/// Current version of gRPC C#
/// </summary>
public const string CurrentVersion = "1.2.0-dev";
public const string CurrentVersion = "1.3.0-dev";
}
}

@ -1,5 +1,5 @@
{
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"title": "gRPC C# Core",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",

@ -1,5 +1,5 @@
{
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"title": "gRPC C# Healthchecking",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2015, Google Inc.",
@ -21,7 +21,7 @@
}
},
"dependencies": {
"Grpc.Core": "1.2.0-dev",
"Grpc.Core": "1.3.0-dev",
"Google.Protobuf": "3.2.0"
},
"frameworks": {

@ -1,5 +1,5 @@
{
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"title": "gRPC C# Reflection",
"authors": [ "Google Inc." ],
"copyright": "Copyright 2016, Google Inc.",
@ -21,7 +21,7 @@
}
},
"dependencies": {
"Grpc.Core": "1.2.0-dev",
"Grpc.Core": "1.3.0-dev",
"Google.Protobuf": "3.2.0"
},
"frameworks": {

@ -28,7 +28,7 @@
@rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@rem Current package versions
set VERSION=1.2.0-dev
set VERSION=1.3.0-dev
set PROTOBUF_VERSION=3.0.0
@rem Adjust the location of nuget.exe

@ -66,7 +66,7 @@ dotnet pack --configuration Release Grpc.Auth/project.json --output ../../artifa
dotnet pack --configuration Release Grpc.HealthCheck/project.json --output ../../artifacts
dotnet pack --configuration Release Grpc.Reflection/project.json --output ../../artifacts
nuget pack Grpc.nuspec -Version "1.2.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "1.2.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.nuspec -Version "1.3.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "1.3.0-dev" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)

@ -1,6 +1,6 @@
{
"name": "grpc-health-check",
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"author": "Google Inc.",
"description": "Health check service for use with gRPC",
"repository": {
@ -15,7 +15,7 @@
}
],
"dependencies": {
"grpc": "^1.2.0-dev",
"grpc": "^1.3.0-dev",
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0"
},

@ -728,7 +728,7 @@ var defaultHandler = {
* method implementation for the provided service.
*/
Server.prototype.addService = function(service, implementation) {
if (!_.isObjectLike(service) || !_.isObjectLike(implementation)) {
if (!_.isObject(service) || !_.isObject(implementation)) {
throw new Error('addService requires two objects as arguments');
}
if (_.keys(service).length === 0) {

@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.2.0-dev",
"version": "1.3.0-dev",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "http://www.grpc.io/",

@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCPlugin'
v = '1.2.0-dev'
v = '1.3.0-dev'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
s.description = <<-DESC

@ -38,4 +38,4 @@
// `tools/buildgen/generate_projects.sh`.
#define GRPC_OBJC_VERSION_STRING @"1.2.0-dev"
#define GRPC_OBJC_VERSION_STRING @"1.3.0-dev"

@ -90,6 +90,9 @@
return nil;
}
// This number indicates how many bytes of overhead does Protocol Buffers encoding add onto the
// message. The number varies as different message.proto is used on different servers. The actual
// number for each interop server is overridden in corresponding derived test classes.
- (int32_t)encodingOverhead {
return 0;
}
@ -169,8 +172,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#ifndef GRPC_COMPILE_WITH_CRONET
// TODO (mxyan): Fix this test
- (void)testResponsesOverMaxSizeFailWithActionableMessage {
XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"ResponseOverMaxSize"];
@ -191,7 +192,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#endif
- (void)testResponsesOver4MBAreAcceptedIfOptedIn {
XCTAssertNotNil(self.class.host);
@ -327,8 +327,6 @@
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#ifndef GRPC_COMPILE_WITH_CRONET
// TODO(makdharma@): Fix this test
- (void)testEmptyStreamRPC {
XCTAssertNotNil(self.class.host);
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyStream"];
@ -342,7 +340,6 @@
}];
[self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil];
}
#endif
- (void)testCancelAfterBeginRPC {
XCTAssertNotNil(self.class.host);

@ -37,6 +37,10 @@
static NSString * const kLocalCleartextHost = @"localhost:5050";
// The Protocol Buffers encoding overhead of local interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kLocalInteropServerOverhead = 10;
/** Tests in InteropTests.m, sending the RPCs to a local cleartext server. */
@interface InteropTestsLocalCleartext : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kLocalCleartextHost = @"localhost:5050";
}
- (int32_t)encodingOverhead {
return 10; // bytes
return kLocalInteropServerOverhead; // bytes
}
- (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kLocalSSLHost = @"localhost:5051";
// The Protocol Buffers encoding overhead of local interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kLocalInteropServerOverhead = 10;
/** Tests in InteropTests.m, sending the RPCs to a local SSL server. */
@interface InteropTestsLocalSSL : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
}
- (int32_t)encodingOverhead {
return 10; // bytes
return kLocalInteropServerOverhead; // bytes
}
- (void)setUp {

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
// The Protocol Buffers encoding overhead of remote interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kRemoteInteropServerOverhead = 12;
/** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemote : InteropTests
@end
@ -48,7 +52,7 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
}
- (int32_t)encodingOverhead {
return 12; // bytes
return kRemoteInteropServerOverhead; // bytes
}
@end

@ -37,6 +37,10 @@
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
// The Protocol Buffers encoding overhead of remote interop server. Acquired
// by experiment. Adjust this when server's proto file changes.
static int32_t kRemoteInteropServerOverhead = 12;
/** Tests in InteropTests.m, sending the RPCs to a remote SSL server. */
@interface InteropTestsRemoteWithCronet : InteropTests
@end
@ -47,4 +51,8 @@ static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
return kRemoteSSLHost;
}
- (int32_t)encodingOverhead {
return kRemoteInteropServerOverhead; // bytes
}
@end

@ -2,7 +2,7 @@
"name": "grpc/grpc-dev",
"description": "gRPC library for PHP - for Developement use only",
"license": "BSD-3-Clause",
"version": "1.2.0",
"version": "1.3.0",
"require": {
"php": ">=5.5.0",
"google/protobuf": "^v3.1.0"

@ -0,0 +1,166 @@
<?php
/*
*
* Copyright 2017, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
* PHP client for QPS testing works as follows:
* 1. Gets initiated by a call from a proxy that implements the worker service. The
* argument to this client is the proxy connection information
* 2. Initiate an RPC to the proxy to get ClientConfig
* 3. Initiate a client-side telemetry RPC to the proxy
* 4. Parse the client config, which includes server target information and then start
* a unary or streaming test as appropriate.
* 5. After each completed RPC, send its timing to the proxy. The proxy does all histogramming
* 6. Proxy will respond on the timing channel when it's time to complete. Our
* next timing write will fail and we know that it's time to stop
* The above complex dance is since threading and async are not idiomatic and we
* shouldn't ever be waiting to read a mark
*
* This test only supports a single channel since threading/async is not idiomatic
* This test supports unary or streaming ping-pongs, as well as open-loop
*
*/
require dirname(__FILE__).'/vendor/autoload.php';
/**
* Assertion function that always exits with an error code if the assertion is
* falsy.
*
* @param $value Assertion value. Should be true.
* @param $error_message Message to display if the assertion is false
*/
function hardAssert($value, $error_message)
{
if (!$value) {
echo $error_message."\n";
exit(1);
}
}
function hardAssertIfStatusOk($status)
{
if ($status->code !== Grpc\STATUS_OK) {
echo "Call did not complete successfully. Status object:\n";
var_dump($status);
exit(1);
}
}
/* Start the actual client */
function qps_client_main($proxy_address) {
echo "Initiating php client\n";
$proxystubopts = [];
$proxystubopts['credentials'] = Grpc\ChannelCredentials::createInsecure();
$proxystub = new Grpc\Testing\ProxyClientServiceClient($proxy_address, $proxystubopts);
list($config, $status) = $proxystub->GetConfig(new Grpc\Testing\Void())->wait();
hardAssertIfStatusOk($status);
hardAssert($config->getClientChannels() == 1, "Only 1 channel supported");
hardAssert($config->getOutstandingRpcsPerChannel() == 1, "Only 1 outstanding RPC supported");
echo "Got configuration from proxy, target is " . $config->getServerTargets()[0] . "\n";
$stubopts = [];
if ($config->getSecurityParams()) {
if ($config->getSecurityParams()->getUseTestCa()) {
$stubopts['credentials'] = Grpc\ChannelCredentials::createSsl(
file_get_contents(dirname(__FILE__).'/../data/ca.pem'));
} else {
$stubopts['credentials'] = Grpc\ChannelCredentials::createSsl(null);
}
$override = $config->getSecurityParams()->getServerHostOverride();
if ($override) {
$stubopts['grpc.ssl_target_name_override'] = $override;
$stubopts['grpc.default_authority'] = $override;
}
} else {
$stubopts['credentials'] = Grpc\ChannelCredentials::createInsecure();
}
echo "Initiating php benchmarking client\n";
$stub = new Grpc\Testing\BenchmarkServiceClient(
$config->getServerTargets()[0], $stubopts);
$req = new Grpc\Testing\SimpleRequest();
$req->setResponseType(Grpc\Testing\PayloadType::COMPRESSABLE);
$req->setResponseSize($config->getPayloadConfig()->getSimpleParams()->getRespSize());
$payload = new Grpc\Testing\Payload();
$payload->setType(Grpc\Testing\PayloadType::COMPRESSABLE);
$payload->setBody(str_repeat("\0", $config->getPayloadConfig()->getSimpleParams()->getReqSize()));
$req->setPayload($payload);
/* TODO(stanley-cheung): Enable the following by removing the 0&& once protobuf
* properly supports oneof in PHP */
if (0 && $config->getLoadParams()->getLoad() == "poisson") {
$poisson = true;
$lamrecip = 1.0/($config->getLoadParams()->getPoisson()->getOfferedLoad());
$issue = microtime(true) + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
} else {
$poisson = false;
}
$metric = new Grpc\Testing\ProxyStat;
$telemetry = $proxystub->ReportTime();
if ($config->getRpcType() == Grpc\Testing\RpcType::UNARY) {
while (1) {
if ($poisson) {
time_sleep_until($issue);
$issue = $issue + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
}
$startreq = microtime(true);
list($resp,$status) = $stub->UnaryCall($req)->wait();
hardAssertIfStatusOk($status);
$metric->setLatency(microtime(true)-$startreq);
$telemetry->write($metric);
}
} else {
$stream = $stub->StreamingCall();
while (1) {
if ($poisson) {
time_sleep_until($issue);
$issue = $issue + $lamrecip * -log(1.0-rand()/(getrandmax()+1));
}
$startreq = microtime(true);
$stream->write($req);
$resp = $stream->read();
$metric->setLatency(microtime(true)-$startreq);
$telemetry->write($metric);
}
}
}
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
qps_client_main($argv[1]);

@ -0,0 +1,11 @@
{
"minimum-stability": "dev",
"require": {
"grpc/grpc": "dev-master"
},
"autoload": {
"psr-4": {
"": "generated_code/"
}
}
}

@ -0,0 +1,127 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Control
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0add170a247372632f70726f746f2f677270632f74657374696e672f636f" .
"6e74726f6c2e70726f746f120c677270632e74657374696e671a25737263" .
"2f70726f746f2f677270632f74657374696e672f7061796c6f6164732e70" .
"726f746f1a227372632f70726f746f2f677270632f74657374696e672f73" .
"746174732e70726f746f22250a0d506f6973736f6e506172616d7312140a" .
"0c6f6666657265645f6c6f616418012001280122120a10436c6f7365644c" .
"6f6f70506172616d73227b0a0a4c6f6164506172616d7312350a0b636c6f" .
"7365645f6c6f6f7018012001280b321e2e677270632e74657374696e672e" .
"436c6f7365644c6f6f70506172616d734800122e0a07706f6973736f6e18" .
"022001280b321b2e677270632e74657374696e672e506f6973736f6e5061" .
"72616d73480042060a046c6f616422430a0e536563757269747950617261" .
"6d7312130a0b7573655f746573745f6361180120012808121c0a14736572" .
"7665725f686f73745f6f76657272696465180220012809224d0a0a436861" .
"6e6e656c417267120c0a046e616d6518012001280912130a097374725f76" .
"616c7565180220012809480012130a09696e745f76616c75651803200128" .
"05480042070a0576616c756522a0040a0c436c69656e74436f6e66696712" .
"160a0e7365727665725f74617267657473180120032809122d0a0b636c69" .
"656e745f7479706518022001280e32182e677270632e74657374696e672e" .
"436c69656e745479706512350a0f73656375726974795f706172616d7318" .
"032001280b321c2e677270632e74657374696e672e536563757269747950" .
"6172616d7312240a1c6f75747374616e64696e675f727063735f7065725f" .
"6368616e6e656c18042001280512170a0f636c69656e745f6368616e6e65" .
"6c73180520012805121c0a146173796e635f636c69656e745f7468726561" .
"647318072001280512270a087270635f7479706518082001280e32152e67" .
"7270632e74657374696e672e52706354797065122d0a0b6c6f61645f7061" .
"72616d73180a2001280b32182e677270632e74657374696e672e4c6f6164" .
"506172616d7312330a0e7061796c6f61645f636f6e666967180b2001280b" .
"321b2e677270632e74657374696e672e5061796c6f6164436f6e66696712" .
"370a10686973746f6772616d5f706172616d73180c2001280b321d2e6772" .
"70632e74657374696e672e486973746f6772616d506172616d7312110a09" .
"636f72655f6c697374180d2003280512120a0a636f72655f6c696d697418" .
"0e2001280512180a106f746865725f636c69656e745f617069180f200128" .
"09122e0a0c6368616e6e656c5f6172677318102003280b32182e67727063" .
"2e74657374696e672e4368616e6e656c41726722380a0c436c69656e7453" .
"746174757312280a05737461747318012001280b32192e677270632e7465" .
"7374696e672e436c69656e74537461747322150a044d61726b120d0a0572" .
"6573657418012001280822680a0a436c69656e7441726773122b0a057365" .
"74757018012001280b321a2e677270632e74657374696e672e436c69656e" .
"74436f6e666967480012220a046d61726b18022001280b32122e67727063" .
"2e74657374696e672e4d61726b480042090a076172677479706522b4020a" .
"0c536572766572436f6e666967122d0a0b7365727665725f747970651801" .
"2001280e32182e677270632e74657374696e672e53657276657254797065" .
"12350a0f73656375726974795f706172616d7318022001280b321c2e6772" .
"70632e74657374696e672e5365637572697479506172616d73120c0a0470" .
"6f7274180420012805121c0a146173796e635f7365727665725f74687265" .
"61647318072001280512120a0a636f72655f6c696d697418082001280512" .
"330a0e7061796c6f61645f636f6e66696718092001280b321b2e67727063" .
"2e74657374696e672e5061796c6f6164436f6e66696712110a09636f7265" .
"5f6c697374180a2003280512180a106f746865725f7365727665725f6170" .
"69180b20012809121c0a137265736f757263655f71756f74615f73697a65" .
"18e9072001280522680a0a53657276657241726773122b0a057365747570" .
"18012001280b321a2e677270632e74657374696e672e536572766572436f" .
"6e666967480012220a046d61726b18022001280b32122e677270632e7465" .
"7374696e672e4d61726b480042090a076172677479706522550a0c536572" .
"76657253746174757312280a05737461747318012001280b32192e677270" .
"632e74657374696e672e5365727665725374617473120c0a04706f727418" .
"0220012805120d0a05636f726573180320012805220d0a0b436f72655265" .
"7175657374221d0a0c436f7265526573706f6e7365120d0a05636f726573" .
"18012001280522060a04566f696422fd010a085363656e6172696f120c0a" .
"046e616d6518012001280912310a0d636c69656e745f636f6e6669671802" .
"2001280b321a2e677270632e74657374696e672e436c69656e74436f6e66" .
"696712130a0b6e756d5f636c69656e747318032001280512310a0d736572" .
"7665725f636f6e66696718042001280b321a2e677270632e74657374696e" .
"672e536572766572436f6e66696712130a0b6e756d5f7365727665727318" .
"052001280512160a0e7761726d75705f7365636f6e647318062001280512" .
"190a1162656e63686d61726b5f7365636f6e647318072001280512200a18" .
"737061776e5f6c6f63616c5f776f726b65725f636f756e74180820012805" .
"22360a095363656e6172696f7312290a097363656e6172696f7318012003" .
"280b32162e677270632e74657374696e672e5363656e6172696f22f8020a" .
"155363656e6172696f526573756c7453756d6d617279120b0a0371707318" .
"0120012801121b0a137170735f7065725f7365727665725f636f72651802" .
"20012801121a0a127365727665725f73797374656d5f74696d6518032001" .
"280112180a107365727665725f757365725f74696d65180420012801121a" .
"0a12636c69656e745f73797374656d5f74696d6518052001280112180a10" .
"636c69656e745f757365725f74696d6518062001280112120a0a6c617465" .
"6e63795f353018072001280112120a0a6c6174656e63795f393018082001" .
"280112120a0a6c6174656e63795f393518092001280112120a0a6c617465" .
"6e63795f3939180a2001280112130a0b6c6174656e63795f393939180b20" .
"01280112180a107365727665725f6370755f7573616765180c2001280112" .
"260a1e7375636365737366756c5f72657175657374735f7065725f736563" .
"6f6e64180d2001280112220a1a6661696c65645f72657175657374735f70" .
"65725f7365636f6e64180e200128012283030a0e5363656e6172696f5265" .
"73756c7412280a087363656e6172696f18012001280b32162e677270632e" .
"74657374696e672e5363656e6172696f122e0a096c6174656e6369657318" .
"022001280b321b2e677270632e74657374696e672e486973746f6772616d" .
"44617461122f0a0c636c69656e745f737461747318032003280b32192e67" .
"7270632e74657374696e672e436c69656e745374617473122f0a0c736572" .
"7665725f737461747318042003280b32192e677270632e74657374696e67" .
"2e536572766572537461747312140a0c7365727665725f636f7265731805" .
"2003280512340a0773756d6d61727918062001280b32232e677270632e74" .
"657374696e672e5363656e6172696f526573756c7453756d6d6172791216" .
"0a0e636c69656e745f7375636365737318072003280812160a0e73657276" .
"65725f7375636365737318082003280812390a0f726571756573745f7265" .
"73756c747318092003280b32202e677270632e74657374696e672e526571" .
"75657374526573756c74436f756e742a410a0a436c69656e745479706512" .
"0f0a0b53594e435f434c49454e54100012100a0c4153594e435f434c4945" .
"4e54100112100a0c4f544845525f434c49454e5410022a5b0a0a53657276" .
"657254797065120f0a0b53594e435f534552564552100012100a0c415359" .
"4e435f534552564552100112180a144153594e435f47454e455249435f53" .
"4552564552100212100a0c4f544845525f53455256455210032a230a0752" .
"70635479706512090a05554e4152591000120d0a0953545245414d494e47" .
"1001620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,69 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Messages
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0ad50a0a257372632f70726f746f2f677270632f74657374696e672f6d65" .
"7373616765732e70726f746f120c677270632e74657374696e67221a0a09" .
"426f6f6c56616c7565120d0a0576616c756518012001280822400a075061" .
"796c6f616412270a047479706518012001280e32192e677270632e746573" .
"74696e672e5061796c6f616454797065120c0a04626f647918022001280c" .
"222b0a0a4563686f537461747573120c0a04636f6465180120012805120f" .
"0a076d65737361676518022001280922ce020a0d53696d706c6552657175" .
"65737412300a0d726573706f6e73655f7479706518012001280e32192e67" .
"7270632e74657374696e672e5061796c6f61645479706512150a0d726573" .
"706f6e73655f73697a6518022001280512260a077061796c6f6164180320" .
"01280b32152e677270632e74657374696e672e5061796c6f616412150a0d" .
"66696c6c5f757365726e616d6518042001280812180a1066696c6c5f6f61" .
"7574685f73636f706518052001280812340a13726573706f6e73655f636f" .
"6d7072657373656418062001280b32172e677270632e74657374696e672e" .
"426f6f6c56616c756512310a0f726573706f6e73655f7374617475731807" .
"2001280b32182e677270632e74657374696e672e4563686f537461747573" .
"12320a116578706563745f636f6d7072657373656418082001280b32172e" .
"677270632e74657374696e672e426f6f6c56616c7565225f0a0e53696d70" .
"6c65526573706f6e736512260a077061796c6f616418012001280b32152e" .
"677270632e74657374696e672e5061796c6f616412100a08757365726e61" .
"6d6518022001280912130a0b6f617574685f73636f706518032001280922" .
"770a1953747265616d696e67496e70757443616c6c526571756573741226" .
"0a077061796c6f616418012001280b32152e677270632e74657374696e67" .
"2e5061796c6f616412320a116578706563745f636f6d7072657373656418" .
"022001280b32172e677270632e74657374696e672e426f6f6c56616c7565" .
"223d0a1a53747265616d696e67496e70757443616c6c526573706f6e7365" .
"121f0a17616767726567617465645f7061796c6f61645f73697a65180120" .
"01280522640a12526573706f6e7365506172616d6574657273120c0a0473" .
"697a6518012001280512130a0b696e74657276616c5f7573180220012805" .
"122b0a0a636f6d7072657373656418032001280b32172e677270632e7465" .
"7374696e672e426f6f6c56616c756522e8010a1a53747265616d696e674f" .
"757470757443616c6c5265717565737412300a0d726573706f6e73655f74" .
"79706518012001280e32192e677270632e74657374696e672e5061796c6f" .
"616454797065123d0a13726573706f6e73655f706172616d657465727318" .
"022003280b32202e677270632e74657374696e672e526573706f6e736550" .
"6172616d657465727312260a077061796c6f616418032001280b32152e67" .
"7270632e74657374696e672e5061796c6f616412310a0f726573706f6e73" .
"655f73746174757318072001280b32182e677270632e74657374696e672e" .
"4563686f53746174757322450a1b53747265616d696e674f757470757443" .
"616c6c526573706f6e736512260a077061796c6f616418012001280b3215" .
"2e677270632e74657374696e672e5061796c6f616422330a0f5265636f6e" .
"6e656374506172616d7312200a186d61785f7265636f6e6e6563745f6261" .
"636b6f66665f6d7318012001280522330a0d5265636f6e6e656374496e66" .
"6f120e0a0670617373656418012001280812120a0a6261636b6f66665f6d" .
"731802200328052a1f0a0b5061796c6f61645479706512100a0c434f4d50" .
"5245535341424c451000620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,37 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Payloads
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a93030a257372632f70726f746f2f677270632f74657374696e672f7061" .
"796c6f6164732e70726f746f120c677270632e74657374696e6722370a10" .
"42797465427566666572506172616d7312100a087265715f73697a651801" .
"2001280512110a09726573705f73697a6518022001280522380a1153696d" .
"706c6550726f746f506172616d7312100a087265715f73697a6518012001" .
"280512110a09726573705f73697a6518022001280522140a12436f6d706c" .
"657850726f746f506172616d7322ca010a0d5061796c6f6164436f6e6669" .
"6712380a0e627974656275665f706172616d7318012001280b321e2e6772" .
"70632e74657374696e672e42797465427566666572506172616d73480012" .
"380a0d73696d706c655f706172616d7318022001280b321f2e677270632e" .
"74657374696e672e53696d706c6550726f746f506172616d734800123a0a" .
"0e636f6d706c65785f706172616d7318032001280b32202e677270632e74" .
"657374696e672e436f6d706c657850726f746f506172616d73480042090a" .
"077061796c6f6164620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,34 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/proxy-service.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class ProxyService
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0a97020a2a7372632f70726f746f2f677270632f74657374696e672f7072" .
"6f78792d736572766963652e70726f746f120c677270632e74657374696e" .
"671a247372632f70726f746f2f677270632f74657374696e672f636f6e74" .
"726f6c2e70726f746f221c0a0950726f787953746174120f0a076c617465" .
"6e6379180120012801328e010a1250726f7879436c69656e745365727669" .
"6365123b0a09476574436f6e66696712122e677270632e74657374696e67" .
"2e566f69641a1a2e677270632e74657374696e672e436c69656e74436f6e" .
"666967123b0a0a5265706f727454696d6512172e677270632e7465737469" .
"6e672e50726f7879537461741a122e677270632e74657374696e672e566f" .
"69642801620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,45 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/services.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Services
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
$pool->internalAddGeneratedFile(hex2bin(
"0ad1040a257372632f70726f746f2f677270632f74657374696e672f7365" .
"7276696365732e70726f746f120c677270632e74657374696e671a257372" .
"632f70726f746f2f677270632f74657374696e672f6d657373616765732e" .
"70726f746f1a247372632f70726f746f2f677270632f74657374696e672f" .
"636f6e74726f6c2e70726f746f32aa010a1042656e63686d61726b536572" .
"7669636512460a09556e61727943616c6c121b2e677270632e7465737469" .
"6e672e53696d706c65526571756573741a1c2e677270632e74657374696e" .
"672e53696d706c65526573706f6e7365124e0a0d53747265616d696e6743" .
"616c6c121b2e677270632e74657374696e672e53696d706c655265717565" .
"73741a1c2e677270632e74657374696e672e53696d706c65526573706f6e" .
"7365280130013297020a0d576f726b65725365727669636512450a095275" .
"6e53657276657212182e677270632e74657374696e672e53657276657241" .
"7267731a1a2e677270632e74657374696e672e5365727665725374617475" .
"732801300112450a0952756e436c69656e7412182e677270632e74657374" .
"696e672e436c69656e74417267731a1a2e677270632e74657374696e672e" .
"436c69656e745374617475732801300112420a09436f7265436f756e7412" .
"192e677270632e74657374696e672e436f7265526571756573741a1a2e67" .
"7270632e74657374696e672e436f7265526573706f6e736512340a0a5175" .
"6974576f726b657212122e677270632e74657374696e672e566f69641a12" .
"2e677270632e74657374696e672e566f6964620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,44 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace GPBMetadata\Src\Proto\Grpc\Testing;
class Stats
{
public static $is_initialized = false;
public static function initOnce() {
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool();
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0adf040a227372632f70726f746f2f677270632f74657374696e672f7374" .
"6174732e70726f746f120c677270632e74657374696e67227a0a0b536572" .
"766572537461747312140a0c74696d655f656c6170736564180120012801" .
"12110a0974696d655f7573657218022001280112130a0b74696d655f7379" .
"7374656d18032001280112160a0e746f74616c5f6370755f74696d651804" .
"2001280412150a0d69646c655f6370755f74696d65180520012804223b0a" .
"0f486973746f6772616d506172616d7312120a0a7265736f6c7574696f6e" .
"18012001280112140a0c6d61785f706f737369626c651802200128012277" .
"0a0d486973746f6772616d44617461120e0a066275636b65741801200328" .
"0d12100a086d696e5f7365656e18022001280112100a086d61785f736565" .
"6e180320012801120b0a0373756d18042001280112160a0e73756d5f6f66" .
"5f73717561726573180520012801120d0a05636f756e7418062001280122" .
"380a1252657175657374526573756c74436f756e7412130a0b7374617475" .
"735f636f6465180120012805120d0a05636f756e7418022001280322b601" .
"0a0b436c69656e745374617473122e0a096c6174656e6369657318012001" .
"280b321b2e677270632e74657374696e672e486973746f6772616d446174" .
"6112140a0c74696d655f656c617073656418022001280112110a0974696d" .
"655f7573657218032001280112130a0b74696d655f73797374656d180420" .
"01280112390a0f726571756573745f726573756c747318052003280b3220" .
"2e677270632e74657374696e672e52657175657374526573756c74436f75" .
"6e74620670726f746f33"
));
static::$is_initialized = true;
}
}

@ -0,0 +1,78 @@
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
namespace Grpc\Testing {
class BenchmarkServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* One request followed by one response.
* The server returns the client payload as-is.
* @param \Grpc\Testing\SimpleRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function UnaryCall(\Grpc\Testing\SimpleRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.BenchmarkService/UnaryCall',
$argument,
['\Grpc\Testing\SimpleResponse', 'decode'],
$metadata, $options);
}
/**
* One request followed by one response.
* The server returns the client payload as-is.
* @param array $metadata metadata
* @param array $options call options
*/
public function StreamingCall($metadata = [], $options = []) {
return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingCall',
['\Grpc\Testing\SimpleResponse','decode'],
$metadata, $options);
}
}
}

@ -0,0 +1,62 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* 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";
* </pre>
*
* Protobuf type <code>grpc.testing.BoolValue</code>
*/
class BoolValue extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
private $value = false;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
public function getValue()
{
return $this->value;
}
/**
* <pre>
* The bool value.
* </pre>
*
* <code>bool value = 1;</code>
*/
public function setValue($var)
{
GPBUtil::checkBool($var);
$this->value = $var;
}
}

@ -0,0 +1,65 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ByteBufferParams</code>
*/
class ByteBufferParams extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 req_size = 1;</code>
*/
private $req_size = 0;
/**
* <code>int32 resp_size = 2;</code>
*/
private $resp_size = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
/**
* <code>int32 req_size = 1;</code>
*/
public function getReqSize()
{
return $this->req_size;
}
/**
* <code>int32 req_size = 1;</code>
*/
public function setReqSize($var)
{
GPBUtil::checkInt32($var);
$this->req_size = $var;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function getRespSize()
{
return $this->resp_size;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function setRespSize($var)
{
GPBUtil::checkInt32($var);
$this->resp_size = $var;
}
}

@ -0,0 +1,84 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ChannelArg</code>
*/
class ChannelArg extends \Google\Protobuf\Internal\Message
{
/**
* <code>string name = 1;</code>
*/
private $name = '';
protected $value;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>string name = 1;</code>
*/
public function getName()
{
return $this->name;
}
/**
* <code>string name = 1;</code>
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
}
/**
* <code>string str_value = 2;</code>
*/
public function getStrValue()
{
return $this->readOneof(2);
}
/**
* <code>string str_value = 2;</code>
*/
public function setStrValue($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(2, $var);
}
/**
* <code>int32 int_value = 3;</code>
*/
public function getIntValue()
{
return $this->readOneof(3);
}
/**
* <code>int32 int_value = 3;</code>
*/
public function setIntValue($var)
{
GPBUtil::checkInt32($var);
$this->writeOneof(3, $var);
}
public function getValue()
{
return $this->whichOneof("value");
}
}

@ -0,0 +1,63 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientArgs</code>
*/
class ClientArgs extends \Google\Protobuf\Internal\Message
{
protected $argtype;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ClientConfig setup = 1;</code>
*/
public function getSetup()
{
return $this->readOneof(1);
}
/**
* <code>.grpc.testing.ClientConfig setup = 1;</code>
*/
public function setSetup(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
$this->writeOneof(1, $var);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function getMark()
{
return $this->readOneof(2);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function setMark(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class);
$this->writeOneof(2, $var);
}
public function getArgtype()
{
return $this->whichOneof("argtype");
}
}

@ -0,0 +1,407 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientConfig</code>
*/
class ClientConfig extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
private $server_targets;
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
private $client_type = 0;
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
private $security_params = null;
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
private $outstanding_rpcs_per_channel = 0;
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
private $client_channels = 0;
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
private $async_client_threads = 0;
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
private $rpc_type = 0;
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
private $load_params = null;
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
private $payload_config = null;
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
private $histogram_params = null;
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
private $core_list;
/**
* <code>int32 core_limit = 14;</code>
*/
private $core_limit = 0;
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
private $other_client_api = '';
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
private $channel_args;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
public function getServerTargets()
{
return $this->server_targets;
}
/**
* <pre>
* List of targets to connect to. At least one target needs to be specified.
* </pre>
*
* <code>repeated string server_targets = 1;</code>
*/
public function setServerTargets(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->server_targets = $var;
}
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
public function getClientType()
{
return $this->client_type;
}
/**
* <code>.grpc.testing.ClientType client_type = 2;</code>
*/
public function setClientType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
$this->client_type = $var;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
public function getSecurityParams()
{
return $this->security_params;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 3;</code>
*/
public function setSecurityParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var;
}
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
public function getOutstandingRpcsPerChannel()
{
return $this->outstanding_rpcs_per_channel;
}
/**
* <pre>
* How many concurrent RPCs to start for each channel.
* For synchronous client, use a separate thread for each outstanding RPC.
* </pre>
*
* <code>int32 outstanding_rpcs_per_channel = 4;</code>
*/
public function setOutstandingRpcsPerChannel($var)
{
GPBUtil::checkInt32($var);
$this->outstanding_rpcs_per_channel = $var;
}
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
public function getClientChannels()
{
return $this->client_channels;
}
/**
* <pre>
* Number of independent client channels to create.
* i-th channel will connect to server_target[i % server_targets.size()]
* </pre>
*
* <code>int32 client_channels = 5;</code>
*/
public function setClientChannels($var)
{
GPBUtil::checkInt32($var);
$this->client_channels = $var;
}
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
public function getAsyncClientThreads()
{
return $this->async_client_threads;
}
/**
* <pre>
* Only for async client. Number of threads to use to start/manage RPCs.
* </pre>
*
* <code>int32 async_client_threads = 7;</code>
*/
public function setAsyncClientThreads($var)
{
GPBUtil::checkInt32($var);
$this->async_client_threads = $var;
}
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
public function getRpcType()
{
return $this->rpc_type;
}
/**
* <code>.grpc.testing.RpcType rpc_type = 8;</code>
*/
public function setRpcType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
$this->rpc_type = $var;
}
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
public function getLoadParams()
{
return $this->load_params;
}
/**
* <pre>
* The requested load for the entire client (aggregated over all the threads).
* </pre>
*
* <code>.grpc.testing.LoadParams load_params = 10;</code>
*/
public function setLoadParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
$this->load_params = $var;
}
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
public function getPayloadConfig()
{
return $this->payload_config;
}
/**
* <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
*/
public function setPayloadConfig(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var;
}
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
public function getHistogramParams()
{
return $this->histogram_params;
}
/**
* <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
*/
public function setHistogramParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
$this->histogram_params = $var;
}
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
public function getCoreList()
{
return $this->core_list;
}
/**
* <pre>
* Specify the cores we should run the client on, if desired
* </pre>
*
* <code>repeated int32 core_list = 13;</code>
*/
public function setCoreList(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $var;
}
/**
* <code>int32 core_limit = 14;</code>
*/
public function getCoreLimit()
{
return $this->core_limit;
}
/**
* <code>int32 core_limit = 14;</code>
*/
public function setCoreLimit($var)
{
GPBUtil::checkInt32($var);
$this->core_limit = $var;
}
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
public function getOtherClientApi()
{
return $this->other_client_api;
}
/**
* <pre>
* If we use an OTHER_CLIENT client_type, this string gives more detail
* </pre>
*
* <code>string other_client_api = 15;</code>
*/
public function setOtherClientApi($var)
{
GPBUtil::checkString($var, True);
$this->other_client_api = $var;
}
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
public function getChannelArgs()
{
return $this->channel_args;
}
/**
* <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
*/
public function setChannelArgs(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
$this->channel_args = $var;
}
}

@ -0,0 +1,164 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientStats</code>
*/
class ClientStats extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
private $latencies = null;
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
private $time_elapsed = 0.0;
/**
* <code>double time_user = 3;</code>
*/
private $time_user = 0.0;
/**
* <code>double time_system = 4;</code>
*/
private $time_system = 0.0;
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
private $request_results;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
public function getLatencies()
{
return $this->latencies;
}
/**
* <pre>
* Latency histogram. Data points are in nanoseconds.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 1;</code>
*/
public function setLatencies(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
$this->latencies = $var;
}
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
public function getTimeElapsed()
{
return $this->time_elapsed;
}
/**
* <pre>
* See ServerStats for details.
* </pre>
*
* <code>double time_elapsed = 2;</code>
*/
public function setTimeElapsed($var)
{
GPBUtil::checkDouble($var);
$this->time_elapsed = $var;
}
/**
* <code>double time_user = 3;</code>
*/
public function getTimeUser()
{
return $this->time_user;
}
/**
* <code>double time_user = 3;</code>
*/
public function setTimeUser($var)
{
GPBUtil::checkDouble($var);
$this->time_user = $var;
}
/**
* <code>double time_system = 4;</code>
*/
public function getTimeSystem()
{
return $this->time_system;
}
/**
* <code>double time_system = 4;</code>
*/
public function setTimeSystem($var)
{
GPBUtil::checkDouble($var);
$this->time_system = $var;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
public function getRequestResults()
{
return $this->request_results;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 5;</code>
*/
public function setRequestResults(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
$this->request_results = $var;
}
}

@ -0,0 +1,44 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ClientStatus</code>
*/
class ClientStatus extends \Google\Protobuf\Internal\Message
{
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
private $stats = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
public function getStats()
{
return $this->stats;
}
/**
* <code>.grpc.testing.ClientStats stats = 1;</code>
*/
public function setStats(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClientStats::class);
$this->stats = $var;
}
}

@ -0,0 +1,34 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
/**
* Protobuf enum <code>grpc.testing.ClientType</code>
*/
class ClientType
{
/**
* <pre>
* Many languages support a basic distinction between using
* sync or async client, and this allows the specification
* </pre>
*
* <code>SYNC_CLIENT = 0;</code>
*/
const SYNC_CLIENT = 0;
/**
* <code>ASYNC_CLIENT = 1;</code>
*/
const ASYNC_CLIENT = 1;
/**
* <pre>
* used for some language-specific variants
* </pre>
*
* <code>OTHER_CLIENT = 2;</code>
*/
const OTHER_CLIENT = 2;
}

@ -0,0 +1,28 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Once an RPC finishes, immediately start a new one.
* No configuration parameters needed.
* </pre>
*
* Protobuf type <code>grpc.testing.ClosedLoopParams</code>
*/
class ClosedLoopParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
}

@ -0,0 +1,28 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* TODO (vpai): Fill this in once the details of complex, representative
* protos are decided
* </pre>
*
* Protobuf type <code>grpc.testing.ComplexProtoParams</code>
*/
class ComplexProtoParams extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
}

@ -0,0 +1,23 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.CoreRequest</code>
*/
class CoreRequest extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
}

@ -0,0 +1,56 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.CoreResponse</code>
*/
class CoreResponse extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Number of cores available on the server
* </pre>
*
* <code>int32 cores = 1;</code>
*/
private $cores = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* Number of cores available on the server
* </pre>
*
* <code>int32 cores = 1;</code>
*/
public function getCores()
{
return $this->cores;
}
/**
* <pre>
* Number of cores available on the server
* </pre>
*
* <code>int32 cores = 1;</code>
*/
public function setCores($var)
{
GPBUtil::checkInt32($var);
$this->cores = $var;
}
}

@ -0,0 +1,70 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* A protobuf representation for grpc status. This is used by test
* clients to specify a status that the server should attempt to return.
* </pre>
*
* Protobuf type <code>grpc.testing.EchoStatus</code>
*/
class EchoStatus extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 code = 1;</code>
*/
private $code = 0;
/**
* <code>string message = 2;</code>
*/
private $message = '';
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <code>int32 code = 1;</code>
*/
public function getCode()
{
return $this->code;
}
/**
* <code>int32 code = 1;</code>
*/
public function setCode($var)
{
GPBUtil::checkInt32($var);
$this->code = $var;
}
/**
* <code>string message = 2;</code>
*/
public function getMessage()
{
return $this->message;
}
/**
* <code>string message = 2;</code>
*/
public function setMessage($var)
{
GPBUtil::checkString($var, True);
$this->message = $var;
}
}

@ -0,0 +1,153 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Histogram data based on grpc/support/histogram.c
* </pre>
*
* Protobuf type <code>grpc.testing.HistogramData</code>
*/
class HistogramData extends \Google\Protobuf\Internal\Message
{
/**
* <code>repeated uint32 bucket = 1;</code>
*/
private $bucket;
/**
* <code>double min_seen = 2;</code>
*/
private $min_seen = 0.0;
/**
* <code>double max_seen = 3;</code>
*/
private $max_seen = 0.0;
/**
* <code>double sum = 4;</code>
*/
private $sum = 0.0;
/**
* <code>double sum_of_squares = 5;</code>
*/
private $sum_of_squares = 0.0;
/**
* <code>double count = 6;</code>
*/
private $count = 0.0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <code>repeated uint32 bucket = 1;</code>
*/
public function getBucket()
{
return $this->bucket;
}
/**
* <code>repeated uint32 bucket = 1;</code>
*/
public function setBucket(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
$this->bucket = $var;
}
/**
* <code>double min_seen = 2;</code>
*/
public function getMinSeen()
{
return $this->min_seen;
}
/**
* <code>double min_seen = 2;</code>
*/
public function setMinSeen($var)
{
GPBUtil::checkDouble($var);
$this->min_seen = $var;
}
/**
* <code>double max_seen = 3;</code>
*/
public function getMaxSeen()
{
return $this->max_seen;
}
/**
* <code>double max_seen = 3;</code>
*/
public function setMaxSeen($var)
{
GPBUtil::checkDouble($var);
$this->max_seen = $var;
}
/**
* <code>double sum = 4;</code>
*/
public function getSum()
{
return $this->sum;
}
/**
* <code>double sum = 4;</code>
*/
public function setSum($var)
{
GPBUtil::checkDouble($var);
$this->sum = $var;
}
/**
* <code>double sum_of_squares = 5;</code>
*/
public function getSumOfSquares()
{
return $this->sum_of_squares;
}
/**
* <code>double sum_of_squares = 5;</code>
*/
public function setSumOfSquares($var)
{
GPBUtil::checkDouble($var);
$this->sum_of_squares = $var;
}
/**
* <code>double count = 6;</code>
*/
public function getCount()
{
return $this->count;
}
/**
* <code>double count = 6;</code>
*/
public function setCount($var)
{
GPBUtil::checkDouble($var);
$this->count = $var;
}
}

@ -0,0 +1,93 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Histogram params based on grpc/support/histogram.c
* </pre>
*
* Protobuf type <code>grpc.testing.HistogramParams</code>
*/
class HistogramParams extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* first bucket is [0, 1 + resolution)
* </pre>
*
* <code>double resolution = 1;</code>
*/
private $resolution = 0.0;
/**
* <pre>
* use enough buckets to allow this value
* </pre>
*
* <code>double max_possible = 2;</code>
*/
private $max_possible = 0.0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <pre>
* first bucket is [0, 1 + resolution)
* </pre>
*
* <code>double resolution = 1;</code>
*/
public function getResolution()
{
return $this->resolution;
}
/**
* <pre>
* first bucket is [0, 1 + resolution)
* </pre>
*
* <code>double resolution = 1;</code>
*/
public function setResolution($var)
{
GPBUtil::checkDouble($var);
$this->resolution = $var;
}
/**
* <pre>
* use enough buckets to allow this value
* </pre>
*
* <code>double max_possible = 2;</code>
*/
public function getMaxPossible()
{
return $this->max_possible;
}
/**
* <pre>
* use enough buckets to allow this value
* </pre>
*
* <code>double max_possible = 2;</code>
*/
public function setMaxPossible($var)
{
GPBUtil::checkDouble($var);
$this->max_possible = $var;
}
}

@ -0,0 +1,63 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.LoadParams</code>
*/
class LoadParams extends \Google\Protobuf\Internal\Message
{
protected $load;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code>
*/
public function getClosedLoop()
{
return $this->readOneof(1);
}
/**
* <code>.grpc.testing.ClosedLoopParams closed_loop = 1;</code>
*/
public function setClosedLoop(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClosedLoopParams::class);
$this->writeOneof(1, $var);
}
/**
* <code>.grpc.testing.PoissonParams poisson = 2;</code>
*/
public function getPoisson()
{
return $this->readOneof(2);
}
/**
* <code>.grpc.testing.PoissonParams poisson = 2;</code>
*/
public function setPoisson(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\PoissonParams::class);
$this->writeOneof(2, $var);
}
public function getLoad()
{
return $this->whichOneof("load");
}
}

@ -0,0 +1,60 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Request current stats
* </pre>
*
* Protobuf type <code>grpc.testing.Mark</code>
*/
class Mark extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* if true, the stats will be reset after taking their snapshot.
* </pre>
*
* <code>bool reset = 1;</code>
*/
private $reset = false;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* if true, the stats will be reset after taking their snapshot.
* </pre>
*
* <code>bool reset = 1;</code>
*/
public function getReset()
{
return $this->reset;
}
/**
* <pre>
* if true, the stats will be reset after taking their snapshot.
* </pre>
*
* <code>bool reset = 1;</code>
*/
public function setReset($var)
{
GPBUtil::checkBool($var);
$this->reset = $var;
}
}

@ -0,0 +1,96 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* A block of data, to simply increase gRPC message size.
* </pre>
*
* Protobuf type <code>grpc.testing.Payload</code>
*/
class Payload extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
* </pre>
*
* <code>.grpc.testing.PayloadType type = 1;</code>
*/
private $type = 0;
/**
* <pre>
* Primary contents of payload.
* </pre>
*
* <code>bytes body = 2;</code>
*/
private $body = '';
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
* </pre>
*
* <code>.grpc.testing.PayloadType type = 1;</code>
*/
public function getType()
{
return $this->type;
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* The type of data in body.
* </pre>
*
* <code>.grpc.testing.PayloadType type = 1;</code>
*/
public function setType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->type = $var;
}
/**
* <pre>
* Primary contents of payload.
* </pre>
*
* <code>bytes body = 2;</code>
*/
public function getBody()
{
return $this->body;
}
/**
* <pre>
* Primary contents of payload.
* </pre>
*
* <code>bytes body = 2;</code>
*/
public function setBody($var)
{
GPBUtil::checkString($var, False);
$this->body = $var;
}
}

@ -0,0 +1,80 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.PayloadConfig</code>
*/
class PayloadConfig extends \Google\Protobuf\Internal\Message
{
protected $payload;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
*/
public function getBytebufParams()
{
return $this->readOneof(1);
}
/**
* <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
*/
public function setBytebufParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class);
$this->writeOneof(1, $var);
}
/**
* <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
*/
public function getSimpleParams()
{
return $this->readOneof(2);
}
/**
* <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
*/
public function setSimpleParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class);
$this->writeOneof(2, $var);
}
/**
* <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
*/
public function getComplexParams()
{
return $this->readOneof(3);
}
/**
* <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
*/
public function setComplexParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class);
$this->writeOneof(3, $var);
}
public function getPayload()
{
return $this->whichOneof("payload");
}
}

@ -0,0 +1,26 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* The type of payload that should be returned.
* </pre>
*
* Protobuf enum <code>grpc.testing.PayloadType</code>
*/
class PayloadType
{
/**
* <pre>
* Compressable text format.
* </pre>
*
* <code>COMPRESSABLE = 0;</code>
*/
const COMPRESSABLE = 0;
}

@ -0,0 +1,61 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Parameters of poisson process distribution, which is a good representation
* of activity coming in from independent identical stationary sources.
* </pre>
*
* Protobuf type <code>grpc.testing.PoissonParams</code>
*/
class PoissonParams extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
*
* <code>double offered_load = 1;</code>
*/
private $offered_load = 0.0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
*
* <code>double offered_load = 1;</code>
*/
public function getOfferedLoad()
{
return $this->offered_load;
}
/**
* <pre>
* The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
* </pre>
*
* <code>double offered_load = 1;</code>
*/
public function setOfferedLoad($var)
{
GPBUtil::checkDouble($var);
$this->offered_load = $var;
}
}

@ -0,0 +1,72 @@
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2017, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
namespace Grpc\Testing {
class ProxyClientServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* @param \Grpc\Testing\Void $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function GetConfig(\Grpc\Testing\Void $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.ProxyClientService/GetConfig',
$argument,
['\Grpc\Testing\ClientConfig', 'decode'],
$metadata, $options);
}
/**
* @param array $metadata metadata
* @param array $options call options
*/
public function ReportTime($metadata = [], $options = []) {
return $this->_clientStreamRequest('/grpc.testing.ProxyClientService/ReportTime',
['\Grpc\Testing\Void','decode'],
$metadata, $options);
}
}
}

@ -0,0 +1,44 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/proxy-service.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ProxyStat</code>
*/
class ProxyStat extends \Google\Protobuf\Internal\Message
{
/**
* <code>double latency = 1;</code>
*/
private $latency = 0.0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\ProxyService::initOnce();
parent::__construct();
}
/**
* <code>double latency = 1;</code>
*/
public function getLatency()
{
return $this->latency;
}
/**
* <code>double latency = 1;</code>
*/
public function setLatency($var)
{
GPBUtil::checkDouble($var);
$this->latency = $var;
}
}

@ -0,0 +1,71 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* For reconnect interop test only.
* Server tells client whether its reconnects are following the spec and the
* reconnect backoffs it saw.
* </pre>
*
* Protobuf type <code>grpc.testing.ReconnectInfo</code>
*/
class ReconnectInfo extends \Google\Protobuf\Internal\Message
{
/**
* <code>bool passed = 1;</code>
*/
private $passed = false;
/**
* <code>repeated int32 backoff_ms = 2;</code>
*/
private $backoff_ms;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <code>bool passed = 1;</code>
*/
public function getPassed()
{
return $this->passed;
}
/**
* <code>bool passed = 1;</code>
*/
public function setPassed($var)
{
GPBUtil::checkBool($var);
$this->passed = $var;
}
/**
* <code>repeated int32 backoff_ms = 2;</code>
*/
public function getBackoffMs()
{
return $this->backoff_ms;
}
/**
* <code>repeated int32 backoff_ms = 2;</code>
*/
public function setBackoffMs(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->backoff_ms = $var;
}
}

@ -0,0 +1,49 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* For reconnect interop test only.
* Client tells server what reconnection parameters it used.
* </pre>
*
* Protobuf type <code>grpc.testing.ReconnectParams</code>
*/
class ReconnectParams extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 max_reconnect_backoff_ms = 1;</code>
*/
private $max_reconnect_backoff_ms = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <code>int32 max_reconnect_backoff_ms = 1;</code>
*/
public function getMaxReconnectBackoffMs()
{
return $this->max_reconnect_backoff_ms;
}
/**
* <code>int32 max_reconnect_backoff_ms = 1;</code>
*/
public function setMaxReconnectBackoffMs($var)
{
GPBUtil::checkInt32($var);
$this->max_reconnect_backoff_ms = $var;
}
}

@ -0,0 +1,65 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.RequestResultCount</code>
*/
class RequestResultCount extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 status_code = 1;</code>
*/
private $status_code = 0;
/**
* <code>int64 count = 2;</code>
*/
private $count = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <code>int32 status_code = 1;</code>
*/
public function getStatusCode()
{
return $this->status_code;
}
/**
* <code>int32 status_code = 1;</code>
*/
public function setStatusCode($var)
{
GPBUtil::checkInt32($var);
$this->status_code = $var;
}
/**
* <code>int64 count = 2;</code>
*/
public function getCount()
{
return $this->count;
}
/**
* <code>int64 count = 2;</code>
*/
public function setCount($var)
{
GPBUtil::checkInt64($var);
$this->count = $var;
}
}

@ -0,0 +1,138 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Configuration for a particular response.
* </pre>
*
* Protobuf type <code>grpc.testing.ResponseParameters</code>
*/
class ResponseParameters extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Desired payload sizes in responses from the server.
* </pre>
*
* <code>int32 size = 1;</code>
*/
private $size = 0;
/**
* <pre>
* Desired interval between consecutive responses in the response stream in
* microseconds.
* </pre>
*
* <code>int32 interval_us = 2;</code>
*/
private $interval_us = 0;
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue compressed = 3;</code>
*/
private $compressed = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* Desired payload sizes in responses from the server.
* </pre>
*
* <code>int32 size = 1;</code>
*/
public function getSize()
{
return $this->size;
}
/**
* <pre>
* Desired payload sizes in responses from the server.
* </pre>
*
* <code>int32 size = 1;</code>
*/
public function setSize($var)
{
GPBUtil::checkInt32($var);
$this->size = $var;
}
/**
* <pre>
* Desired interval between consecutive responses in the response stream in
* microseconds.
* </pre>
*
* <code>int32 interval_us = 2;</code>
*/
public function getIntervalUs()
{
return $this->interval_us;
}
/**
* <pre>
* Desired interval between consecutive responses in the response stream in
* microseconds.
* </pre>
*
* <code>int32 interval_us = 2;</code>
*/
public function setIntervalUs($var)
{
GPBUtil::checkInt32($var);
$this->interval_us = $var;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue compressed = 3;</code>
*/
public function getCompressed()
{
return $this->compressed;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue compressed = 3;</code>
*/
public function setCompressed(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->compressed = $var;
}
}

@ -0,0 +1,21 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
/**
* Protobuf enum <code>grpc.testing.RpcType</code>
*/
class RpcType
{
/**
* <code>UNARY = 0;</code>
*/
const UNARY = 0;
/**
* <code>STREAMING = 1;</code>
*/
const STREAMING = 1;
}

@ -0,0 +1,291 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* A single performance scenario: input to qps_json_driver
* </pre>
*
* Protobuf type <code>grpc.testing.Scenario</code>
*/
class Scenario extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Human readable name for this scenario
* </pre>
*
* <code>string name = 1;</code>
*/
private $name = '';
/**
* <pre>
* Client configuration
* </pre>
*
* <code>.grpc.testing.ClientConfig client_config = 2;</code>
*/
private $client_config = null;
/**
* <pre>
* Number of clients to start for the test
* </pre>
*
* <code>int32 num_clients = 3;</code>
*/
private $num_clients = 0;
/**
* <pre>
* Server configuration
* </pre>
*
* <code>.grpc.testing.ServerConfig server_config = 4;</code>
*/
private $server_config = null;
/**
* <pre>
* Number of servers to start for the test
* </pre>
*
* <code>int32 num_servers = 5;</code>
*/
private $num_servers = 0;
/**
* <pre>
* Warmup period, in seconds
* </pre>
*
* <code>int32 warmup_seconds = 6;</code>
*/
private $warmup_seconds = 0;
/**
* <pre>
* Benchmark time, in seconds
* </pre>
*
* <code>int32 benchmark_seconds = 7;</code>
*/
private $benchmark_seconds = 0;
/**
* <pre>
* Number of workers to spawn locally (usually zero)
* </pre>
*
* <code>int32 spawn_local_worker_count = 8;</code>
*/
private $spawn_local_worker_count = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* Human readable name for this scenario
* </pre>
*
* <code>string name = 1;</code>
*/
public function getName()
{
return $this->name;
}
/**
* <pre>
* Human readable name for this scenario
* </pre>
*
* <code>string name = 1;</code>
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
}
/**
* <pre>
* Client configuration
* </pre>
*
* <code>.grpc.testing.ClientConfig client_config = 2;</code>
*/
public function getClientConfig()
{
return $this->client_config;
}
/**
* <pre>
* Client configuration
* </pre>
*
* <code>.grpc.testing.ClientConfig client_config = 2;</code>
*/
public function setClientConfig(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class);
$this->client_config = $var;
}
/**
* <pre>
* Number of clients to start for the test
* </pre>
*
* <code>int32 num_clients = 3;</code>
*/
public function getNumClients()
{
return $this->num_clients;
}
/**
* <pre>
* Number of clients to start for the test
* </pre>
*
* <code>int32 num_clients = 3;</code>
*/
public function setNumClients($var)
{
GPBUtil::checkInt32($var);
$this->num_clients = $var;
}
/**
* <pre>
* Server configuration
* </pre>
*
* <code>.grpc.testing.ServerConfig server_config = 4;</code>
*/
public function getServerConfig()
{
return $this->server_config;
}
/**
* <pre>
* Server configuration
* </pre>
*
* <code>.grpc.testing.ServerConfig server_config = 4;</code>
*/
public function setServerConfig(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class);
$this->server_config = $var;
}
/**
* <pre>
* Number of servers to start for the test
* </pre>
*
* <code>int32 num_servers = 5;</code>
*/
public function getNumServers()
{
return $this->num_servers;
}
/**
* <pre>
* Number of servers to start for the test
* </pre>
*
* <code>int32 num_servers = 5;</code>
*/
public function setNumServers($var)
{
GPBUtil::checkInt32($var);
$this->num_servers = $var;
}
/**
* <pre>
* Warmup period, in seconds
* </pre>
*
* <code>int32 warmup_seconds = 6;</code>
*/
public function getWarmupSeconds()
{
return $this->warmup_seconds;
}
/**
* <pre>
* Warmup period, in seconds
* </pre>
*
* <code>int32 warmup_seconds = 6;</code>
*/
public function setWarmupSeconds($var)
{
GPBUtil::checkInt32($var);
$this->warmup_seconds = $var;
}
/**
* <pre>
* Benchmark time, in seconds
* </pre>
*
* <code>int32 benchmark_seconds = 7;</code>
*/
public function getBenchmarkSeconds()
{
return $this->benchmark_seconds;
}
/**
* <pre>
* Benchmark time, in seconds
* </pre>
*
* <code>int32 benchmark_seconds = 7;</code>
*/
public function setBenchmarkSeconds($var)
{
GPBUtil::checkInt32($var);
$this->benchmark_seconds = $var;
}
/**
* <pre>
* Number of workers to spawn locally (usually zero)
* </pre>
*
* <code>int32 spawn_local_worker_count = 8;</code>
*/
public function getSpawnLocalWorkerCount()
{
return $this->spawn_local_worker_count;
}
/**
* <pre>
* Number of workers to spawn locally (usually zero)
* </pre>
*
* <code>int32 spawn_local_worker_count = 8;</code>
*/
public function setSpawnLocalWorkerCount($var)
{
GPBUtil::checkInt32($var);
$this->spawn_local_worker_count = $var;
}
}

@ -0,0 +1,312 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Results of a single benchmark scenario.
* </pre>
*
* Protobuf type <code>grpc.testing.ScenarioResult</code>
*/
class ScenarioResult extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Inputs used to run the scenario.
* </pre>
*
* <code>.grpc.testing.Scenario scenario = 1;</code>
*/
private $scenario = null;
/**
* <pre>
* Histograms from all clients merged into one histogram.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 2;</code>
*/
private $latencies = null;
/**
* <pre>
* Client stats for each client
* </pre>
*
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
*/
private $client_stats;
/**
* <pre>
* Server stats for each server
* </pre>
*
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
*/
private $server_stats;
/**
* <pre>
* Number of cores available to each server
* </pre>
*
* <code>repeated int32 server_cores = 5;</code>
*/
private $server_cores;
/**
* <pre>
* An after-the-fact computed summary
* </pre>
*
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
*/
private $summary = null;
/**
* <pre>
* Information on success or failure of each worker
* </pre>
*
* <code>repeated bool client_success = 7;</code>
*/
private $client_success;
/**
* <code>repeated bool server_success = 8;</code>
*/
private $server_success;
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
*/
private $request_results;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* Inputs used to run the scenario.
* </pre>
*
* <code>.grpc.testing.Scenario scenario = 1;</code>
*/
public function getScenario()
{
return $this->scenario;
}
/**
* <pre>
* Inputs used to run the scenario.
* </pre>
*
* <code>.grpc.testing.Scenario scenario = 1;</code>
*/
public function setScenario(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Scenario::class);
$this->scenario = $var;
}
/**
* <pre>
* Histograms from all clients merged into one histogram.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 2;</code>
*/
public function getLatencies()
{
return $this->latencies;
}
/**
* <pre>
* Histograms from all clients merged into one histogram.
* </pre>
*
* <code>.grpc.testing.HistogramData latencies = 2;</code>
*/
public function setLatencies(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\HistogramData::class);
$this->latencies = $var;
}
/**
* <pre>
* Client stats for each client
* </pre>
*
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
*/
public function getClientStats()
{
return $this->client_stats;
}
/**
* <pre>
* Client stats for each client
* </pre>
*
* <code>repeated .grpc.testing.ClientStats client_stats = 3;</code>
*/
public function setClientStats(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ClientStats::class);
$this->client_stats = $var;
}
/**
* <pre>
* Server stats for each server
* </pre>
*
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
*/
public function getServerStats()
{
return $this->server_stats;
}
/**
* <pre>
* Server stats for each server
* </pre>
*
* <code>repeated .grpc.testing.ServerStats server_stats = 4;</code>
*/
public function setServerStats(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ServerStats::class);
$this->server_stats = $var;
}
/**
* <pre>
* Number of cores available to each server
* </pre>
*
* <code>repeated int32 server_cores = 5;</code>
*/
public function getServerCores()
{
return $this->server_cores;
}
/**
* <pre>
* Number of cores available to each server
* </pre>
*
* <code>repeated int32 server_cores = 5;</code>
*/
public function setServerCores(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->server_cores = $var;
}
/**
* <pre>
* An after-the-fact computed summary
* </pre>
*
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
*/
public function getSummary()
{
return $this->summary;
}
/**
* <pre>
* An after-the-fact computed summary
* </pre>
*
* <code>.grpc.testing.ScenarioResultSummary summary = 6;</code>
*/
public function setSummary(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ScenarioResultSummary::class);
$this->summary = $var;
}
/**
* <pre>
* Information on success or failure of each worker
* </pre>
*
* <code>repeated bool client_success = 7;</code>
*/
public function getClientSuccess()
{
return $this->client_success;
}
/**
* <pre>
* Information on success or failure of each worker
* </pre>
*
* <code>repeated bool client_success = 7;</code>
*/
public function setClientSuccess(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
$this->client_success = $var;
}
/**
* <code>repeated bool server_success = 8;</code>
*/
public function getServerSuccess()
{
return $this->server_success;
}
/**
* <code>repeated bool server_success = 8;</code>
*/
public function setServerSuccess(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
$this->server_success = $var;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
*/
public function getRequestResults()
{
return $this->request_results;
}
/**
* <pre>
* Number of failed requests (one row per status code seen)
* </pre>
*
* <code>repeated .grpc.testing.RequestResultCount request_results = 9;</code>
*/
public function setRequestResults(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\RequestResultCount::class);
$this->request_results = $var;
}
}

@ -0,0 +1,430 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Basic summary that can be computed from ClientStats and ServerStats
* once the scenario has finished.
* </pre>
*
* Protobuf type <code>grpc.testing.ScenarioResultSummary</code>
*/
class ScenarioResultSummary extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Total number of operations per second over all clients.
* </pre>
*
* <code>double qps = 1;</code>
*/
private $qps = 0.0;
/**
* <pre>
* QPS per one server core.
* </pre>
*
* <code>double qps_per_server_core = 2;</code>
*/
private $qps_per_server_core = 0.0;
/**
* <pre>
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_system_time = 3;</code>
*/
private $server_system_time = 0.0;
/**
* <pre>
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_user_time = 4;</code>
*/
private $server_user_time = 0.0;
/**
* <pre>
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_system_time = 5;</code>
*/
private $client_system_time = 0.0;
/**
* <pre>
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_user_time = 6;</code>
*/
private $client_user_time = 0.0;
/**
* <pre>
* X% latency percentiles (in nanoseconds)
* </pre>
*
* <code>double latency_50 = 7;</code>
*/
private $latency_50 = 0.0;
/**
* <code>double latency_90 = 8;</code>
*/
private $latency_90 = 0.0;
/**
* <code>double latency_95 = 9;</code>
*/
private $latency_95 = 0.0;
/**
* <code>double latency_99 = 10;</code>
*/
private $latency_99 = 0.0;
/**
* <code>double latency_999 = 11;</code>
*/
private $latency_999 = 0.0;
/**
* <pre>
* server cpu usage percentage
* </pre>
*
* <code>double server_cpu_usage = 12;</code>
*/
private $server_cpu_usage = 0.0;
/**
* <pre>
* Number of requests that succeeded/failed
* </pre>
*
* <code>double successful_requests_per_second = 13;</code>
*/
private $successful_requests_per_second = 0.0;
/**
* <code>double failed_requests_per_second = 14;</code>
*/
private $failed_requests_per_second = 0.0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <pre>
* Total number of operations per second over all clients.
* </pre>
*
* <code>double qps = 1;</code>
*/
public function getQps()
{
return $this->qps;
}
/**
* <pre>
* Total number of operations per second over all clients.
* </pre>
*
* <code>double qps = 1;</code>
*/
public function setQps($var)
{
GPBUtil::checkDouble($var);
$this->qps = $var;
}
/**
* <pre>
* QPS per one server core.
* </pre>
*
* <code>double qps_per_server_core = 2;</code>
*/
public function getQpsPerServerCore()
{
return $this->qps_per_server_core;
}
/**
* <pre>
* QPS per one server core.
* </pre>
*
* <code>double qps_per_server_core = 2;</code>
*/
public function setQpsPerServerCore($var)
{
GPBUtil::checkDouble($var);
$this->qps_per_server_core = $var;
}
/**
* <pre>
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_system_time = 3;</code>
*/
public function getServerSystemTime()
{
return $this->server_system_time;
}
/**
* <pre>
* server load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_system_time = 3;</code>
*/
public function setServerSystemTime($var)
{
GPBUtil::checkDouble($var);
$this->server_system_time = $var;
}
/**
* <pre>
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_user_time = 4;</code>
*/
public function getServerUserTime()
{
return $this->server_user_time;
}
/**
* <pre>
* server load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double server_user_time = 4;</code>
*/
public function setServerUserTime($var)
{
GPBUtil::checkDouble($var);
$this->server_user_time = $var;
}
/**
* <pre>
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_system_time = 5;</code>
*/
public function getClientSystemTime()
{
return $this->client_system_time;
}
/**
* <pre>
* client load based on system_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_system_time = 5;</code>
*/
public function setClientSystemTime($var)
{
GPBUtil::checkDouble($var);
$this->client_system_time = $var;
}
/**
* <pre>
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_user_time = 6;</code>
*/
public function getClientUserTime()
{
return $this->client_user_time;
}
/**
* <pre>
* client load based on user_time (0.85 =&gt; 85%)
* </pre>
*
* <code>double client_user_time = 6;</code>
*/
public function setClientUserTime($var)
{
GPBUtil::checkDouble($var);
$this->client_user_time = $var;
}
/**
* <pre>
* X% latency percentiles (in nanoseconds)
* </pre>
*
* <code>double latency_50 = 7;</code>
*/
public function getLatency50()
{
return $this->latency_50;
}
/**
* <pre>
* X% latency percentiles (in nanoseconds)
* </pre>
*
* <code>double latency_50 = 7;</code>
*/
public function setLatency50($var)
{
GPBUtil::checkDouble($var);
$this->latency_50 = $var;
}
/**
* <code>double latency_90 = 8;</code>
*/
public function getLatency90()
{
return $this->latency_90;
}
/**
* <code>double latency_90 = 8;</code>
*/
public function setLatency90($var)
{
GPBUtil::checkDouble($var);
$this->latency_90 = $var;
}
/**
* <code>double latency_95 = 9;</code>
*/
public function getLatency95()
{
return $this->latency_95;
}
/**
* <code>double latency_95 = 9;</code>
*/
public function setLatency95($var)
{
GPBUtil::checkDouble($var);
$this->latency_95 = $var;
}
/**
* <code>double latency_99 = 10;</code>
*/
public function getLatency99()
{
return $this->latency_99;
}
/**
* <code>double latency_99 = 10;</code>
*/
public function setLatency99($var)
{
GPBUtil::checkDouble($var);
$this->latency_99 = $var;
}
/**
* <code>double latency_999 = 11;</code>
*/
public function getLatency999()
{
return $this->latency_999;
}
/**
* <code>double latency_999 = 11;</code>
*/
public function setLatency999($var)
{
GPBUtil::checkDouble($var);
$this->latency_999 = $var;
}
/**
* <pre>
* server cpu usage percentage
* </pre>
*
* <code>double server_cpu_usage = 12;</code>
*/
public function getServerCpuUsage()
{
return $this->server_cpu_usage;
}
/**
* <pre>
* server cpu usage percentage
* </pre>
*
* <code>double server_cpu_usage = 12;</code>
*/
public function setServerCpuUsage($var)
{
GPBUtil::checkDouble($var);
$this->server_cpu_usage = $var;
}
/**
* <pre>
* Number of requests that succeeded/failed
* </pre>
*
* <code>double successful_requests_per_second = 13;</code>
*/
public function getSuccessfulRequestsPerSecond()
{
return $this->successful_requests_per_second;
}
/**
* <pre>
* Number of requests that succeeded/failed
* </pre>
*
* <code>double successful_requests_per_second = 13;</code>
*/
public function setSuccessfulRequestsPerSecond($var)
{
GPBUtil::checkDouble($var);
$this->successful_requests_per_second = $var;
}
/**
* <code>double failed_requests_per_second = 14;</code>
*/
public function getFailedRequestsPerSecond()
{
return $this->failed_requests_per_second;
}
/**
* <code>double failed_requests_per_second = 14;</code>
*/
public function setFailedRequestsPerSecond($var)
{
GPBUtil::checkDouble($var);
$this->failed_requests_per_second = $var;
}
}

@ -0,0 +1,48 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* A set of scenarios to be run with qps_json_driver
* </pre>
*
* Protobuf type <code>grpc.testing.Scenarios</code>
*/
class Scenarios extends \Google\Protobuf\Internal\Message
{
/**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
*/
private $scenarios;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
*/
public function getScenarios()
{
return $this->scenarios;
}
/**
* <code>repeated .grpc.testing.Scenario scenarios = 1;</code>
*/
public function setScenarios(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\Scenario::class);
$this->scenarios = $var;
}
}

@ -0,0 +1,69 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* presence of SecurityParams implies use of TLS
* </pre>
*
* Protobuf type <code>grpc.testing.SecurityParams</code>
*/
class SecurityParams extends \Google\Protobuf\Internal\Message
{
/**
* <code>bool use_test_ca = 1;</code>
*/
private $use_test_ca = false;
/**
* <code>string server_host_override = 2;</code>
*/
private $server_host_override = '';
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>bool use_test_ca = 1;</code>
*/
public function getUseTestCa()
{
return $this->use_test_ca;
}
/**
* <code>bool use_test_ca = 1;</code>
*/
public function setUseTestCa($var)
{
GPBUtil::checkBool($var);
$this->use_test_ca = $var;
}
/**
* <code>string server_host_override = 2;</code>
*/
public function getServerHostOverride()
{
return $this->server_host_override;
}
/**
* <code>string server_host_override = 2;</code>
*/
public function setServerHostOverride($var)
{
GPBUtil::checkString($var, True);
$this->server_host_override = $var;
}
}

@ -0,0 +1,63 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ServerArgs</code>
*/
class ServerArgs extends \Google\Protobuf\Internal\Message
{
protected $argtype;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ServerConfig setup = 1;</code>
*/
public function getSetup()
{
return $this->readOneof(1);
}
/**
* <code>.grpc.testing.ServerConfig setup = 1;</code>
*/
public function setSetup(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class);
$this->writeOneof(1, $var);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function getMark()
{
return $this->readOneof(2);
}
/**
* <code>.grpc.testing.Mark mark = 2;</code>
*/
public function setMark(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Mark::class);
$this->writeOneof(2, $var);
}
public function getArgtype()
{
return $this->whichOneof("argtype");
}
}

@ -0,0 +1,305 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ServerConfig</code>
*/
class ServerConfig extends \Google\Protobuf\Internal\Message
{
/**
* <code>.grpc.testing.ServerType server_type = 1;</code>
*/
private $server_type = 0;
/**
* <code>.grpc.testing.SecurityParams security_params = 2;</code>
*/
private $security_params = null;
/**
* <pre>
* Port on which to listen. Zero means pick unused port.
* </pre>
*
* <code>int32 port = 4;</code>
*/
private $port = 0;
/**
* <pre>
* Only for async server. Number of threads used to serve the requests.
* </pre>
*
* <code>int32 async_server_threads = 7;</code>
*/
private $async_server_threads = 0;
/**
* <pre>
* Specify the number of cores to limit server to, if desired
* </pre>
*
* <code>int32 core_limit = 8;</code>
*/
private $core_limit = 0;
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
*/
private $payload_config = null;
/**
* <pre>
* Specify the cores we should run the server on, if desired
* </pre>
*
* <code>repeated int32 core_list = 10;</code>
*/
private $core_list;
/**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
*
* <code>string other_server_api = 11;</code>
*/
private $other_server_api = '';
/**
* <pre>
* Buffer pool size (no buffer pool specified if unset)
* </pre>
*
* <code>int32 resource_quota_size = 1001;</code>
*/
private $resource_quota_size = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ServerType server_type = 1;</code>
*/
public function getServerType()
{
return $this->server_type;
}
/**
* <code>.grpc.testing.ServerType server_type = 1;</code>
*/
public function setServerType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\ServerType::class);
$this->server_type = $var;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 2;</code>
*/
public function getSecurityParams()
{
return $this->security_params;
}
/**
* <code>.grpc.testing.SecurityParams security_params = 2;</code>
*/
public function setSecurityParams(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
$this->security_params = $var;
}
/**
* <pre>
* Port on which to listen. Zero means pick unused port.
* </pre>
*
* <code>int32 port = 4;</code>
*/
public function getPort()
{
return $this->port;
}
/**
* <pre>
* Port on which to listen. Zero means pick unused port.
* </pre>
*
* <code>int32 port = 4;</code>
*/
public function setPort($var)
{
GPBUtil::checkInt32($var);
$this->port = $var;
}
/**
* <pre>
* Only for async server. Number of threads used to serve the requests.
* </pre>
*
* <code>int32 async_server_threads = 7;</code>
*/
public function getAsyncServerThreads()
{
return $this->async_server_threads;
}
/**
* <pre>
* Only for async server. Number of threads used to serve the requests.
* </pre>
*
* <code>int32 async_server_threads = 7;</code>
*/
public function setAsyncServerThreads($var)
{
GPBUtil::checkInt32($var);
$this->async_server_threads = $var;
}
/**
* <pre>
* Specify the number of cores to limit server to, if desired
* </pre>
*
* <code>int32 core_limit = 8;</code>
*/
public function getCoreLimit()
{
return $this->core_limit;
}
/**
* <pre>
* Specify the number of cores to limit server to, if desired
* </pre>
*
* <code>int32 core_limit = 8;</code>
*/
public function setCoreLimit($var)
{
GPBUtil::checkInt32($var);
$this->core_limit = $var;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
*/
public function getPayloadConfig()
{
return $this->payload_config;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
*/
public function setPayloadConfig(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
$this->payload_config = $var;
}
/**
* <pre>
* Specify the cores we should run the server on, if desired
* </pre>
*
* <code>repeated int32 core_list = 10;</code>
*/
public function getCoreList()
{
return $this->core_list;
}
/**
* <pre>
* Specify the cores we should run the server on, if desired
* </pre>
*
* <code>repeated int32 core_list = 10;</code>
*/
public function setCoreList(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
$this->core_list = $var;
}
/**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
*
* <code>string other_server_api = 11;</code>
*/
public function getOtherServerApi()
{
return $this->other_server_api;
}
/**
* <pre>
* If we use an OTHER_SERVER client_type, this string gives more detail
* </pre>
*
* <code>string other_server_api = 11;</code>
*/
public function setOtherServerApi($var)
{
GPBUtil::checkString($var, True);
$this->other_server_api = $var;
}
/**
* <pre>
* Buffer pool size (no buffer pool specified if unset)
* </pre>
*
* <code>int32 resource_quota_size = 1001;</code>
*/
public function getResourceQuotaSize()
{
return $this->resource_quota_size;
}
/**
* <pre>
* Buffer pool size (no buffer pool specified if unset)
* </pre>
*
* <code>int32 resource_quota_size = 1001;</code>
*/
public function setResourceQuotaSize($var)
{
GPBUtil::checkInt32($var);
$this->resource_quota_size = $var;
}
}

@ -0,0 +1,191 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/stats.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ServerStats</code>
*/
class ServerStats extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* wall clock time change in seconds since last reset
* </pre>
*
* <code>double time_elapsed = 1;</code>
*/
private $time_elapsed = 0.0;
/**
* <pre>
* change in user time (in seconds) used by the server since last reset
* </pre>
*
* <code>double time_user = 2;</code>
*/
private $time_user = 0.0;
/**
* <pre>
* change in server time (in seconds) used by the server process and all
* threads since last reset
* </pre>
*
* <code>double time_system = 3;</code>
*/
private $time_system = 0.0;
/**
* <pre>
* change in total cpu time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 total_cpu_time = 4;</code>
*/
private $total_cpu_time = 0;
/**
* <pre>
* change in idle time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 idle_cpu_time = 5;</code>
*/
private $idle_cpu_time = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Stats::initOnce();
parent::__construct();
}
/**
* <pre>
* wall clock time change in seconds since last reset
* </pre>
*
* <code>double time_elapsed = 1;</code>
*/
public function getTimeElapsed()
{
return $this->time_elapsed;
}
/**
* <pre>
* wall clock time change in seconds since last reset
* </pre>
*
* <code>double time_elapsed = 1;</code>
*/
public function setTimeElapsed($var)
{
GPBUtil::checkDouble($var);
$this->time_elapsed = $var;
}
/**
* <pre>
* change in user time (in seconds) used by the server since last reset
* </pre>
*
* <code>double time_user = 2;</code>
*/
public function getTimeUser()
{
return $this->time_user;
}
/**
* <pre>
* change in user time (in seconds) used by the server since last reset
* </pre>
*
* <code>double time_user = 2;</code>
*/
public function setTimeUser($var)
{
GPBUtil::checkDouble($var);
$this->time_user = $var;
}
/**
* <pre>
* change in server time (in seconds) used by the server process and all
* threads since last reset
* </pre>
*
* <code>double time_system = 3;</code>
*/
public function getTimeSystem()
{
return $this->time_system;
}
/**
* <pre>
* change in server time (in seconds) used by the server process and all
* threads since last reset
* </pre>
*
* <code>double time_system = 3;</code>
*/
public function setTimeSystem($var)
{
GPBUtil::checkDouble($var);
$this->time_system = $var;
}
/**
* <pre>
* change in total cpu time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 total_cpu_time = 4;</code>
*/
public function getTotalCpuTime()
{
return $this->total_cpu_time;
}
/**
* <pre>
* change in total cpu time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 total_cpu_time = 4;</code>
*/
public function setTotalCpuTime($var)
{
GPBUtil::checkUint64($var);
$this->total_cpu_time = $var;
}
/**
* <pre>
* change in idle time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 idle_cpu_time = 5;</code>
*/
public function getIdleCpuTime()
{
return $this->idle_cpu_time;
}
/**
* <pre>
* change in idle time of the server (data from proc/stat)
* </pre>
*
* <code>uint64 idle_cpu_time = 5;</code>
*/
public function setIdleCpuTime($var)
{
GPBUtil::checkUint64($var);
$this->idle_cpu_time = $var;
}
}

@ -0,0 +1,110 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.ServerStatus</code>
*/
class ServerStatus extends \Google\Protobuf\Internal\Message
{
/**
* <code>.grpc.testing.ServerStats stats = 1;</code>
*/
private $stats = null;
/**
* <pre>
* the port bound by the server
* </pre>
*
* <code>int32 port = 2;</code>
*/
private $port = 0;
/**
* <pre>
* Number of cores available to the server
* </pre>
*
* <code>int32 cores = 3;</code>
*/
private $cores = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
/**
* <code>.grpc.testing.ServerStats stats = 1;</code>
*/
public function getStats()
{
return $this->stats;
}
/**
* <code>.grpc.testing.ServerStats stats = 1;</code>
*/
public function setStats(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\ServerStats::class);
$this->stats = $var;
}
/**
* <pre>
* the port bound by the server
* </pre>
*
* <code>int32 port = 2;</code>
*/
public function getPort()
{
return $this->port;
}
/**
* <pre>
* the port bound by the server
* </pre>
*
* <code>int32 port = 2;</code>
*/
public function setPort($var)
{
GPBUtil::checkInt32($var);
$this->port = $var;
}
/**
* <pre>
* Number of cores available to the server
* </pre>
*
* <code>int32 cores = 3;</code>
*/
public function getCores()
{
return $this->cores;
}
/**
* <pre>
* Number of cores available to the server
* </pre>
*
* <code>int32 cores = 3;</code>
*/
public function setCores($var)
{
GPBUtil::checkInt32($var);
$this->cores = $var;
}
}

@ -0,0 +1,33 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
/**
* Protobuf enum <code>grpc.testing.ServerType</code>
*/
class ServerType
{
/**
* <code>SYNC_SERVER = 0;</code>
*/
const SYNC_SERVER = 0;
/**
* <code>ASYNC_SERVER = 1;</code>
*/
const ASYNC_SERVER = 1;
/**
* <code>ASYNC_GENERIC_SERVER = 2;</code>
*/
const ASYNC_GENERIC_SERVER = 2;
/**
* <pre>
* used for some language-specific variants
* </pre>
*
* <code>OTHER_SERVER = 3;</code>
*/
const OTHER_SERVER = 3;
}

@ -0,0 +1,65 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/payloads.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.SimpleProtoParams</code>
*/
class SimpleProtoParams extends \Google\Protobuf\Internal\Message
{
/**
* <code>int32 req_size = 1;</code>
*/
private $req_size = 0;
/**
* <code>int32 resp_size = 2;</code>
*/
private $resp_size = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
parent::__construct();
}
/**
* <code>int32 req_size = 1;</code>
*/
public function getReqSize()
{
return $this->req_size;
}
/**
* <code>int32 req_size = 1;</code>
*/
public function setReqSize($var)
{
GPBUtil::checkInt32($var);
$this->req_size = $var;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function getRespSize()
{
return $this->resp_size;
}
/**
* <code>int32 resp_size = 2;</code>
*/
public function setRespSize($var)
{
GPBUtil::checkInt32($var);
$this->resp_size = $var;
}
}

@ -0,0 +1,306 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Unary request.
* </pre>
*
* Protobuf type <code>grpc.testing.SimpleRequest</code>
*/
class SimpleRequest extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
private $response_type = 0;
/**
* <pre>
* Desired payload size in the response from the server.
* </pre>
*
* <code>int32 response_size = 2;</code>
*/
private $response_size = 0;
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
private $payload = null;
/**
* <pre>
* Whether SimpleResponse should include username.
* </pre>
*
* <code>bool fill_username = 4;</code>
*/
private $fill_username = false;
/**
* <pre>
* Whether SimpleResponse should include OAuth scope.
* </pre>
*
* <code>bool fill_oauth_scope = 5;</code>
*/
private $fill_oauth_scope = false;
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue response_compressed = 6;</code>
*/
private $response_compressed = null;
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
private $response_status = null;
/**
* <pre>
* Whether the server should expect this request to be compressed.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
*/
private $expect_compressed = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
public function getResponseType()
{
return $this->response_type;
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* Desired payload type in the response from the server.
* If response_type is RANDOM, server randomly chooses one from other formats.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
public function setResponseType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->response_type = $var;
}
/**
* <pre>
* Desired payload size in the response from the server.
* </pre>
*
* <code>int32 response_size = 2;</code>
*/
public function getResponseSize()
{
return $this->response_size;
}
/**
* <pre>
* Desired payload size in the response from the server.
* </pre>
*
* <code>int32 response_size = 2;</code>
*/
public function setResponseSize($var)
{
GPBUtil::checkInt32($var);
$this->response_size = $var;
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
public function getPayload()
{
return $this->payload;
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
public function setPayload(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var;
}
/**
* <pre>
* Whether SimpleResponse should include username.
* </pre>
*
* <code>bool fill_username = 4;</code>
*/
public function getFillUsername()
{
return $this->fill_username;
}
/**
* <pre>
* Whether SimpleResponse should include username.
* </pre>
*
* <code>bool fill_username = 4;</code>
*/
public function setFillUsername($var)
{
GPBUtil::checkBool($var);
$this->fill_username = $var;
}
/**
* <pre>
* Whether SimpleResponse should include OAuth scope.
* </pre>
*
* <code>bool fill_oauth_scope = 5;</code>
*/
public function getFillOauthScope()
{
return $this->fill_oauth_scope;
}
/**
* <pre>
* Whether SimpleResponse should include OAuth scope.
* </pre>
*
* <code>bool fill_oauth_scope = 5;</code>
*/
public function setFillOauthScope($var)
{
GPBUtil::checkBool($var);
$this->fill_oauth_scope = $var;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue response_compressed = 6;</code>
*/
public function getResponseCompressed()
{
return $this->response_compressed;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue response_compressed = 6;</code>
*/
public function setResponseCompressed(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->response_compressed = $var;
}
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
public function getResponseStatus()
{
return $this->response_status;
}
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
public function setResponseStatus(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
$this->response_status = $var;
}
/**
* <pre>
* Whether the server should expect this request to be compressed.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
*/
public function getExpectCompressed()
{
return $this->expect_compressed;
}
/**
* <pre>
* Whether the server should expect this request to be compressed.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
*/
public function setExpectCompressed(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->expect_compressed = $var;
}
}

@ -0,0 +1,129 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Unary response, as configured by the request.
* </pre>
*
* Protobuf type <code>grpc.testing.SimpleResponse</code>
*/
class SimpleResponse extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Payload to increase message size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
private $payload = null;
/**
* <pre>
* The user the request came from, for verifying authentication was
* successful when the client expected it.
* </pre>
*
* <code>string username = 2;</code>
*/
private $username = '';
/**
* <pre>
* OAuth scope.
* </pre>
*
* <code>string oauth_scope = 3;</code>
*/
private $oauth_scope = '';
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* Payload to increase message size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function getPayload()
{
return $this->payload;
}
/**
* <pre>
* Payload to increase message size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function setPayload(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var;
}
/**
* <pre>
* The user the request came from, for verifying authentication was
* successful when the client expected it.
* </pre>
*
* <code>string username = 2;</code>
*/
public function getUsername()
{
return $this->username;
}
/**
* <pre>
* The user the request came from, for verifying authentication was
* successful when the client expected it.
* </pre>
*
* <code>string username = 2;</code>
*/
public function setUsername($var)
{
GPBUtil::checkString($var, True);
$this->username = $var;
}
/**
* <pre>
* OAuth scope.
* </pre>
*
* <code>string oauth_scope = 3;</code>
*/
public function getOauthScope()
{
return $this->oauth_scope;
}
/**
* <pre>
* OAuth scope.
* </pre>
*
* <code>string oauth_scope = 3;</code>
*/
public function setOauthScope($var)
{
GPBUtil::checkString($var, True);
$this->oauth_scope = $var;
}
}

@ -0,0 +1,102 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Client-streaming request.
* </pre>
*
* Protobuf type <code>grpc.testing.StreamingInputCallRequest</code>
*/
class StreamingInputCallRequest extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
private $payload = null;
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
*/
private $expect_compressed = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function getPayload()
{
return $this->payload;
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function setPayload(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
*/
public function getExpectCompressed()
{
return $this->expect_compressed;
}
/**
* <pre>
* 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.
* </pre>
*
* <code>.grpc.testing.BoolValue expect_compressed = 2;</code>
*/
public function setExpectCompressed(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
$this->expect_compressed = $var;
}
}

@ -0,0 +1,60 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Client-streaming response.
* </pre>
*
* Protobuf type <code>grpc.testing.StreamingInputCallResponse</code>
*/
class StreamingInputCallResponse extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Aggregated size of payloads received from the client.
* </pre>
*
* <code>int32 aggregated_payload_size = 1;</code>
*/
private $aggregated_payload_size = 0;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* Aggregated size of payloads received from the client.
* </pre>
*
* <code>int32 aggregated_payload_size = 1;</code>
*/
public function getAggregatedPayloadSize()
{
return $this->aggregated_payload_size;
}
/**
* <pre>
* Aggregated size of payloads received from the client.
* </pre>
*
* <code>int32 aggregated_payload_size = 1;</code>
*/
public function setAggregatedPayloadSize($var)
{
GPBUtil::checkInt32($var);
$this->aggregated_payload_size = $var;
}
}

@ -0,0 +1,171 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Server-streaming request.
* </pre>
*
* Protobuf type <code>grpc.testing.StreamingOutputCallRequest</code>
*/
class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
private $response_type = 0;
/**
* <pre>
* Configuration for each expected response message.
* </pre>
*
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
*/
private $response_parameters;
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
private $payload = null;
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
private $response_status = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
public function getResponseType()
{
return $this->response_type;
}
/**
* <pre>
* DEPRECATED, don't use. To be removed shortly.
* 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.
* </pre>
*
* <code>.grpc.testing.PayloadType response_type = 1;</code>
*/
public function setResponseType($var)
{
GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
$this->response_type = $var;
}
/**
* <pre>
* Configuration for each expected response message.
* </pre>
*
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
*/
public function getResponseParameters()
{
return $this->response_parameters;
}
/**
* <pre>
* Configuration for each expected response message.
* </pre>
*
* <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
*/
public function setResponseParameters(&$var)
{
GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
$this->response_parameters = $var;
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
public function getPayload()
{
return $this->payload;
}
/**
* <pre>
* Optional input payload sent along with the request.
* </pre>
*
* <code>.grpc.testing.Payload payload = 3;</code>
*/
public function setPayload(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var;
}
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
public function getResponseStatus()
{
return $this->response_status;
}
/**
* <pre>
* Whether server should return a given status
* </pre>
*
* <code>.grpc.testing.EchoStatus response_status = 7;</code>
*/
public function setResponseStatus(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
$this->response_status = $var;
}
}

@ -0,0 +1,60 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* <pre>
* Server-streaming response, as configured by the request and parameters.
* </pre>
*
* Protobuf type <code>grpc.testing.StreamingOutputCallResponse</code>
*/
class StreamingOutputCallResponse extends \Google\Protobuf\Internal\Message
{
/**
* <pre>
* Payload to increase response size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
private $payload = null;
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct();
}
/**
* <pre>
* Payload to increase response size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function getPayload()
{
return $this->payload;
}
/**
* <pre>
* Payload to increase response size.
* </pre>
*
* <code>.grpc.testing.Payload payload = 1;</code>
*/
public function setPayload(&$var)
{
GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
$this->payload = $var;
}
}

@ -0,0 +1,23 @@
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: src/proto/grpc/testing/control.proto
namespace Grpc\Testing;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Protobuf type <code>grpc.testing.Void</code>
*/
class Void extends \Google\Protobuf\Internal\Message
{
public function __construct() {
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
parent::__construct();
}
}

@ -0,0 +1,111 @@
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// An integration test service that covers all the method signature permutations
// of unary/streaming requests/responses.
namespace Grpc\Testing {
class WorkerServiceClient extends \Grpc\BaseStub {
/**
* @param string $hostname hostname
* @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}
/**
* Start server with specified workload.
* First request sent specifies the ServerConfig followed by ServerStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test server
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
* @param array $metadata metadata
* @param array $options call options
*/
public function RunServer($metadata = [], $options = []) {
return $this->_bidiRequest('/grpc.testing.WorkerService/RunServer',
['\Grpc\Testing\ServerStatus','decode'],
$metadata, $options);
}
/**
* Start client with specified workload.
* First request sent specifies the ClientConfig followed by ClientStatus
* response. After that, a "Mark" can be sent anytime to request the latest
* stats. Closing the stream will initiate shutdown of the test client
* and once the shutdown has finished, the OK status is sent to terminate
* this RPC.
* @param array $metadata metadata
* @param array $options call options
*/
public function RunClient($metadata = [], $options = []) {
return $this->_bidiRequest('/grpc.testing.WorkerService/RunClient',
['\Grpc\Testing\ClientStatus','decode'],
$metadata, $options);
}
/**
* Just return the core count - unary call
* @param \Grpc\Testing\CoreRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function CoreCount(\Grpc\Testing\CoreRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.WorkerService/CoreCount',
$argument,
['\Grpc\Testing\CoreResponse', 'decode'],
$metadata, $options);
}
/**
* Quit this worker
* @param \Grpc\Testing\Void $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function QuitWorker(\Grpc\Testing\Void $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/grpc.testing.WorkerService/QuitWorker',
$argument,
['\Grpc\Testing\Void', 'decode'],
$metadata, $options);
}
}
}

@ -0,0 +1,44 @@
// Copyright 2017, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
import "src/proto/grpc/testing/control.proto";
package grpc.testing;
message ProxyStat {
double latency = 1;
}
service ProxyClientService {
rpc GetConfig(Void) returns (ClientConfig);
rpc ReportTime(stream ProxyStat) returns (Void);
}

@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
VERSION='1.2.0.dev0'
VERSION='1.3.0.dev0'

@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
VERSION='1.2.0.dev0'
VERSION='1.3.0.dev0'

@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
VERSION='1.2.0.dev0'
VERSION='1.3.0.dev0'

@ -29,4 +29,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!!
VERSION='1.2.0.dev0'
VERSION='1.3.0.dev0'

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save