Merge remote-tracking branch 'upstream/master'

pull/20150/head
vam-google 5 years ago
commit 9e6e57bfba
  1. 2
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 2
      .github/ISSUE_TEMPLATE/cleanup_request.md
  3. 2
      .github/ISSUE_TEMPLATE/feature_request.md
  4. 10
      .github/mergeable.yml
  5. 2
      .github/pull_request_template.md
  6. 59
      .github/stale.yml
  7. 8
      .gitmodules
  8. 1
      AUTHORS
  9. 115
      BUILD
  10. 34
      BUILD.gn
  11. 1322
      CMakeLists.txt
  12. 4
      CONTRIBUTING.md
  13. 1
      GOVERNANCE.md
  14. 82
      MAINTAINERS.md
  15. 873
      Makefile
  16. 8
      README.md
  17. 3
      WORKSPACE
  18. 49
      bazel/grpc_build_system.bzl
  19. 38
      bazel/grpc_deps.bzl
  20. 15
      bazel/grpc_python_deps.bzl
  21. 48
      bazel/python_rules.bzl
  22. 3
      bazel/test/python_test_repo/WORKSPACE
  23. 201
      build.yaml
  24. 12
      cmake/pkg-config-template.pc.in
  25. 15
      config.m4
  26. 11
      config.w32
  27. 47
      doc/core/moving-to-c++.md
  28. 3
      doc/g_stands_for.md
  29. 6
      doc/interop-test-descriptions.md
  30. 2
      doc/keepalive.md
  31. 9
      doc/server_reflection_tutorial.md
  32. 2
      doc/server_side_auth.md
  33. 100
      etc/roots.pem
  34. 8
      examples/cpp/helloworld/.gitignore
  35. 4
      examples/cpp/helloworld/Makefile
  36. 6
      examples/csharp/Helloworld/Greeter/Greeter.csproj
  37. 30
      examples/csharp/HelloworldLegacyCsproj/Greeter/Greeter.csproj
  38. 15
      examples/csharp/HelloworldLegacyCsproj/Greeter/packages.config
  39. 28
      examples/csharp/HelloworldLegacyCsproj/GreeterClient/GreeterClient.csproj
  40. 13
      examples/csharp/HelloworldLegacyCsproj/GreeterClient/packages.config
  41. 28
      examples/csharp/HelloworldLegacyCsproj/GreeterServer/GreeterServer.csproj
  42. 13
      examples/csharp/HelloworldLegacyCsproj/GreeterServer/packages.config
  43. 38
      examples/csharp/HelloworldXamarin/Droid/HelloworldXamarin.Droid.csproj
  44. 7
      examples/csharp/HelloworldXamarin/Droid/Properties/AndroidManifest.xml
  45. 8
      examples/csharp/HelloworldXamarin/Droid/packages.config
  46. 36
      examples/csharp/HelloworldXamarin/HelloworldXamarin.sln
  47. 2
      examples/csharp/HelloworldXamarin/iOS/AppDelegate.cs
  48. 45
      examples/csharp/HelloworldXamarin/iOS/HelloworldXamarin.iOS.csproj
  49. 8
      examples/csharp/HelloworldXamarin/iOS/packages.config
  50. 6
      examples/csharp/RouteGuide/RouteGuide/RouteGuide.csproj
  51. 53
      examples/objective-c/helloworld/README.md
  52. 2
      examples/php/README.md
  53. 86
      examples/php/echo/README.md
  54. 49
      examples/php/echo/apache.Dockerfile
  55. 38
      examples/php/echo/base.Dockerfile
  56. 52
      examples/php/echo/cli.Dockerfile
  57. 45
      examples/php/echo/client.php
  58. 12
      examples/php/echo/composer.json
  59. 100
      examples/php/echo/echo.proto
  60. 49
      examples/php/echo/fpm.Dockerfile
  61. 23
      examples/php/echo/nginx.conf
  62. 3
      examples/python/auth/BUILD.bazel
  63. 3
      examples/python/cancellation/BUILD.bazel
  64. 2
      examples/python/cancellation/README.md
  65. 2
      examples/python/cancellation/hash_name.proto
  66. 3
      examples/python/compression/BUILD.bazel
  67. 36
      examples/python/data_transmission/README.cn.md
  68. 37
      examples/python/data_transmission/README.en.md
  69. 114
      examples/python/data_transmission/client.py
  70. 69
      examples/python/data_transmission/demo.proto
  71. 174
      examples/python/data_transmission/demo_pb2.py
  72. 106
      examples/python/data_transmission/demo_pb2_grpc.py
  73. 114
      examples/python/data_transmission/server.py
  74. 3
      examples/python/debug/BUILD.bazel
  75. 9
      examples/python/debug/get_stats.py
  76. 1
      examples/python/errors/BUILD.bazel
  77. 3
      examples/python/multiprocessing/BUILD
  78. 1
      examples/python/wait_for_ready/BUILD.bazel
  79. 15
      gRPC-C++.podspec
  80. 44
      gRPC-Core.podspec
  81. 32
      gRPC-ProtoRPC.podspec
  82. 19
      gRPC-RxLibrary.podspec
  83. 152
      gRPC.podspec
  84. 24
      grpc.gemspec
  85. 84
      grpc.gyp
  86. 62
      include/grpc/grpc_security.h
  87. 15
      include/grpc/impl/codegen/grpc_types.h
  88. 39
      include/grpc/impl/codegen/port_platform.h
  89. 2
      include/grpc/impl/codegen/sync_generic.h
  90. 2
      include/grpcpp/impl/codegen/async_generic_service.h
  91. 8
      include/grpcpp/impl/codegen/async_stream_impl.h
  92. 8
      include/grpcpp/impl/codegen/async_unary_call_impl.h
  93. 27
      include/grpcpp/impl/codegen/byte_buffer.h
  94. 69
      include/grpcpp/impl/codegen/call_op_set.h
  95. 4
      include/grpcpp/impl/codegen/callback_common.h
  96. 8
      include/grpcpp/impl/codegen/channel_interface.h
  97. 59
      include/grpcpp/impl/codegen/client_callback_impl.h
  98. 6
      include/grpcpp/impl/codegen/client_context_impl.h
  99. 33
      include/grpcpp/impl/codegen/completion_queue_impl.h
  100. 6
      include/grpcpp/impl/codegen/config_protobuf.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -2,7 +2,7 @@
name: Report a bug
about: Create a report to help us improve
labels: kind/bug, priority/P2
assignees: mhaidrygoog
assignees: yang-g
---

@ -2,7 +2,7 @@
name: Request a cleanup
about: Suggest a cleanup in our repository
labels: kind/internal cleanup
assignees: mhaidrygoog
assignees: yang-g
---

@ -2,7 +2,7 @@
name: Request a feature
about: Suggest an idea for this project
labels: kind/enhancement
assignees: mhaidrygoog
assignees: yang-g
---

@ -8,11 +8,11 @@ mergeable:
- or:
- and:
- must_include:
regex: 'release notes: yes'
message: 'Please include release note: yes'
regex: '^release notes: yes'
message: 'Please add the label (release notes: yes)'
- must_include:
regex: '^lang\/'
message: 'Please include a language label'
message: 'Please add a language label (lang/...)'
- must_include:
regex: 'release notes: no'
message: 'Please include release note: no'
regex: '^release notes: no'
message: 'Please add the label (release notes: no)'

@ -8,4 +8,4 @@ If you know who should review your pull request, please remove the mentioning be
-->
@mhaidrygoog
@yang-g

@ -0,0 +1,59 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 180
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 1
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- "disposition/never stale"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: "disposition/stale"
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue/PR has been automatically marked as stale because it has not had any update (including
commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no
further update occurs in 1 day. Thank you for your contributions!
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

8
.gitmodules vendored

@ -34,14 +34,6 @@
[submodule "third_party/abseil-cpp"]
path = third_party/abseil-cpp
url = https://github.com/abseil/abseil-cpp
[submodule "third_party/libcxxabi"]
path = third_party/libcxxabi
url = https://github.com/llvm-mirror/libcxxabi.git
branch = release_60
[submodule "third_party/libcxx"]
path = third_party/libcxx
url = https://github.com/llvm-mirror/libcxx.git
branch = release_60
[submodule "third_party/envoy-api"]
path = third_party/envoy-api
url = https://github.com/envoyproxy/data-plane-api.git

@ -1,3 +1,4 @@
Dropbox, Inc.
Google Inc.
Skyscanner Ltd.
WeWork Companies Inc.

115
BUILD

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
licenses(["notice"]) # Apache v2
licenses(["notice"])
exports_files(["LICENSE"])
@ -31,6 +31,7 @@ load(
"grpc_cc_library",
"grpc_generate_one_off_targets",
"grpc_upb_proto_library",
"python_config_settings",
)
config_setting(
@ -63,27 +64,19 @@ config_setting(
values = {"cpu": "x64_windows_msvc"},
)
config_setting(
name = "python3",
values = {"python_path": "python3"},
)
config_setting(
name = "mac_x86_64",
values = {"cpu": "darwin"},
)
config_setting(
name = "grpc_use_cpp_std_lib",
values = {"define": "GRPC_USE_CPP_STD_LIB=1"},
)
python_config_settings()
# This should be updated along with build.yaml
g_stands_for = "ganges"
g_stands_for = "game"
core_version = "7.0.0"
version = "1.24.0-dev"
version = "1.25.0-dev"
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
@ -265,6 +258,7 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/security/credentials_impl.h",
"include/grpcpp/security/server_credentials.h",
"include/grpcpp/security/server_credentials_impl.h",
"include/grpcpp/security/tls_credentials_options.h",
"include/grpcpp/server.h",
"include/grpcpp/server_impl.h",
"include/grpcpp/server_builder.h",
@ -285,6 +279,7 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/support/config.h",
"include/grpcpp/support/interceptor.h",
"include/grpcpp/support/message_allocator.h",
"include/grpcpp/support/method_handler.h",
"include/grpcpp/support/proto_buffer_reader.h",
"include/grpcpp/support/proto_buffer_writer.h",
"include/grpcpp/support/server_callback.h",
@ -361,12 +356,15 @@ grpc_cc_library(
"src/cpp/common/secure_auth_context.cc",
"src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc",
"src/cpp/common/tls_credentials_options.cc",
"src/cpp/common/tls_credentials_options_util.cc",
"src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/secure_server_credentials.cc",
],
hdrs = [
"src/cpp/client/secure_credentials.h",
"src/cpp/common/secure_auth_context.h",
"src/cpp/common/tls_credentials_options_util.h",
"src/cpp/server/secure_server_credentials.h",
],
language = "c++",
@ -375,6 +373,7 @@ grpc_cc_library(
deps = [
"gpr",
"grpc",
"grpc_secure",
"grpc++_base",
"grpc++_codegen_base",
"grpc++_codegen_base_src",
@ -473,7 +472,6 @@ grpc_cc_library(
"src/core/lib/gpr/log_linux.cc",
"src/core/lib/gpr/log_posix.cc",
"src/core/lib/gpr/log_windows.cc",
"src/core/lib/gpr/mpscq.cc",
"src/core/lib/gpr/murmur_hash.cc",
"src/core/lib/gpr/string.cc",
"src/core/lib/gpr/string_posix.cc",
@ -495,6 +493,7 @@ grpc_cc_library(
"src/core/lib/gprpp/fork.cc",
"src/core/lib/gprpp/global_config_env.cc",
"src/core/lib/gprpp/host_port.cc",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/thd_posix.cc",
"src/core/lib/gprpp/thd_windows.cc",
"src/core/lib/profiling/basic_timers.cc",
@ -504,7 +503,6 @@ grpc_cc_library(
"src/core/lib/gpr/alloc.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
"src/core/lib/gpr/mpscq.h",
"src/core/lib/gpr/murmur_hash.h",
"src/core/lib/gpr/spinlock.h",
"src/core/lib/gpr/string.h",
@ -516,7 +514,6 @@ grpc_cc_library(
"src/core/lib/gpr/tls_pthread.h",
"src/core/lib/gpr/tmpfile.h",
"src/core/lib/gpr/useful.h",
"src/core/lib/gprpp/abstract.h",
"src/core/lib/gprpp/arena.h",
"src/core/lib/gprpp/atomic.h",
"src/core/lib/gprpp/fork.h",
@ -528,7 +525,8 @@ grpc_cc_library(
"src/core/lib/gprpp/manual_constructor.h",
"src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/pair.h",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/set.h",
"src/core/lib/gprpp/string_view.h",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
@ -856,7 +854,7 @@ grpc_cc_library(
"src/core/lib/iomgr/executor/mpmcqueue.h",
"src/core/lib/iomgr/executor/threadpool.h",
"src/core/lib/iomgr/gethostname.h",
"src/core/lib/iomgr/gevent_util.h",
"src/core/lib/iomgr/python_util.h",
"src/core/lib/iomgr/grpc_if_nametoindex.h",
"src/core/lib/iomgr/internal_errqueue.h",
"src/core/lib/iomgr/iocp_windows.h",
@ -1254,27 +1252,66 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "grpc_xds_client",
srcs = [
"src/core/ext/filters/client_channel/xds/xds_api.cc",
"src/core/ext/filters/client_channel/xds/xds_client.cc",
"src/core/ext/filters/client_channel/xds/xds_channel.cc",
"src/core/ext/filters/client_channel/xds/xds_client_stats.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/xds/xds_api.h",
"src/core/ext/filters/client_channel/xds/xds_client.h",
"src/core/ext/filters/client_channel/xds/xds_channel.h",
"src/core/ext/filters/client_channel/xds/xds_channel_args.h",
"src/core/ext/filters/client_channel/xds/xds_client_stats.h",
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
],
)
grpc_cc_library(
name = "grpc_xds_client_secure",
srcs = [
"src/core/ext/filters/client_channel/xds/xds_api.cc",
"src/core/ext/filters/client_channel/xds/xds_client.cc",
"src/core/ext/filters/client_channel/xds/xds_channel_secure.cc",
"src/core/ext/filters/client_channel/xds/xds_client_stats.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/xds/xds_api.h",
"src/core/ext/filters/client_channel/xds/xds_client.h",
"src/core/ext/filters/client_channel/xds/xds_channel.h",
"src/core/ext/filters/client_channel/xds/xds_channel_args.h",
"src/core/ext/filters/client_channel/xds/xds_client_stats.h",
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
"grpc_secure",
],
)
grpc_cc_library(
name = "grpc_lb_policy_xds",
srcs = [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h",
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
"grpc_resolver_fake",
"grpc_transport_chttp2_client_insecure",
"grpc_xds_client",
],
)
@ -1282,24 +1319,15 @@ grpc_cc_library(
name = "grpc_lb_policy_xds_secure",
srcs = [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h",
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
"grpc_resolver_fake",
"grpc_secure",
"grpc_transport_chttp2_client_secure",
"grpc_xds_client_secure",
],
)
@ -1582,6 +1610,7 @@ grpc_cc_library(
"src/core/lib/security/security_connector/security_connector.cc",
"src/core/lib/security/security_connector/ssl/ssl_security_connector.cc",
"src/core/lib/security/security_connector/ssl_utils.cc",
"src/core/lib/security/security_connector/ssl_utils_config.cc",
"src/core/lib/security/security_connector/tls/spiffe_security_connector.cc",
"src/core/lib/security/transport/client_auth_filter.cc",
"src/core/lib/security/transport/secure_endpoint.cc",
@ -1594,7 +1623,7 @@ grpc_cc_library(
],
hdrs = [
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
"src/core/ext/filters/client_channel/xds/xds_channel_args.h",
"src/core/lib/security/context/security_context.h",
"src/core/lib/security/credentials/alts/alts_credentials.h",
"src/core/lib/security/credentials/composite/composite_credentials.h",
@ -1619,6 +1648,7 @@ grpc_cc_library(
"src/core/lib/security/security_connector/security_connector.h",
"src/core/lib/security/security_connector/ssl/ssl_security_connector.h",
"src/core/lib/security/security_connector/ssl_utils.h",
"src/core/lib/security/security_connector/ssl_utils_config.h",
"src/core/lib/security/security_connector/tls/spiffe_security_connector.h",
"src/core/lib/security/transport/auth_filters.h",
"src/core/lib/security/transport/secure_endpoint.h",
@ -1957,6 +1987,7 @@ grpc_cc_library(
deps = [
"grpc",
"grpc++_codegen_base",
"grpc++_codegen_base_src",
"grpc_health_upb",
],
)
@ -1969,6 +2000,7 @@ grpc_cc_library(
public_hdrs = GRPCXX_PUBLIC_HDRS,
deps = [
"grpc++_codegen_base",
"grpc++_codegen_base_src",
"grpc_health_upb",
"grpc_unsecure",
],
@ -2039,6 +2071,7 @@ grpc_cc_library(
"include/grpcpp/impl/codegen/interceptor_common.h",
"include/grpcpp/impl/codegen/message_allocator.h",
"include/grpcpp/impl/codegen/metadata_map.h",
"include/grpcpp/impl/codegen/method_handler.h",
"include/grpcpp/impl/codegen/method_handler_impl.h",
"include/grpcpp/impl/codegen/rpc_method.h",
"include/grpcpp/impl/codegen/rpc_service_method.h",
@ -2517,3 +2550,11 @@ filegroup(
],
visibility = ["//visibility:public"],
)
# Base classes of EventManagerInterface
grpc_cc_library(
name = "eventmanager_interface",
hdrs = [
"src/core/lib/iomgr/poller/eventmanager_interface.h",
],
)

@ -104,8 +104,6 @@ config("grpc_config") {
"src/core/lib/gpr/log_linux.cc",
"src/core/lib/gpr/log_posix.cc",
"src/core/lib/gpr/log_windows.cc",
"src/core/lib/gpr/mpscq.cc",
"src/core/lib/gpr/mpscq.h",
"src/core/lib/gpr/murmur_hash.cc",
"src/core/lib/gpr/murmur_hash.h",
"src/core/lib/gpr/spinlock.h",
@ -134,7 +132,6 @@ config("grpc_config") {
"src/core/lib/gpr/tmpfile_windows.cc",
"src/core/lib/gpr/useful.h",
"src/core/lib/gpr/wrap_memcpy.cc",
"src/core/lib/gprpp/abstract.h",
"src/core/lib/gprpp/arena.cc",
"src/core/lib/gprpp/arena.h",
"src/core/lib/gprpp/atomic.h",
@ -150,7 +147,9 @@ config("grpc_config") {
"src/core/lib/gprpp/manual_constructor.h",
"src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/pair.h",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/set.h",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/gprpp/thd_posix.cc",
@ -247,12 +246,6 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/lb_policy/subchannel_list.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h",
"src/core/ext/filters/client_channel/lb_policy_factory.h",
"src/core/ext/filters/client_channel/lb_policy_registry.cc",
"src/core/ext/filters/client_channel/lb_policy_registry.h",
@ -303,6 +296,15 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/subchannel_interface.h",
"src/core/ext/filters/client_channel/subchannel_pool_interface.cc",
"src/core/ext/filters/client_channel/subchannel_pool_interface.h",
"src/core/ext/filters/client_channel/xds/xds_api.cc",
"src/core/ext/filters/client_channel/xds/xds_api.h",
"src/core/ext/filters/client_channel/xds/xds_channel.h",
"src/core/ext/filters/client_channel/xds/xds_channel_args.h",
"src/core/ext/filters/client_channel/xds/xds_channel_secure.cc",
"src/core/ext/filters/client_channel/xds/xds_client.cc",
"src/core/ext/filters/client_channel/xds/xds_client.h",
"src/core/ext/filters/client_channel/xds/xds_client_stats.cc",
"src/core/ext/filters/client_channel/xds/xds_client_stats.h",
"src/core/ext/filters/client_idle/client_idle_filter.cc",
"src/core/ext/filters/deadline/deadline_filter.cc",
"src/core/ext/filters/deadline/deadline_filter.h",
@ -749,6 +751,8 @@ config("grpc_config") {
"src/core/lib/security/security_connector/ssl/ssl_security_connector.h",
"src/core/lib/security/security_connector/ssl_utils.cc",
"src/core/lib/security/security_connector/ssl_utils.h",
"src/core/lib/security/security_connector/ssl_utils_config.cc",
"src/core/lib/security/security_connector/ssl_utils_config.h",
"src/core/lib/security/security_connector/tls/spiffe_security_connector.cc",
"src/core/lib/security/security_connector/tls/spiffe_security_connector.h",
"src/core/lib/security/transport/auth_filters.h",
@ -1115,6 +1119,7 @@ config("grpc_config") {
"include/grpcpp/impl/codegen/interceptor_common.h",
"include/grpcpp/impl/codegen/message_allocator.h",
"include/grpcpp/impl/codegen/metadata_map.h",
"include/grpcpp/impl/codegen/method_handler.h",
"include/grpcpp/impl/codegen/method_handler_impl.h",
"include/grpcpp/impl/codegen/proto_buffer_reader.h",
"include/grpcpp/impl/codegen/proto_buffer_writer.h",
@ -1159,6 +1164,7 @@ config("grpc_config") {
"include/grpcpp/security/credentials_impl.h",
"include/grpcpp/security/server_credentials.h",
"include/grpcpp/security/server_credentials_impl.h",
"include/grpcpp/security/tls_credentials_options.h",
"include/grpcpp/server.h",
"include/grpcpp/server_builder.h",
"include/grpcpp/server_builder_impl.h",
@ -1223,7 +1229,6 @@ config("grpc_config") {
"src/core/lib/gpr/alloc.h",
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
"src/core/lib/gpr/mpscq.h",
"src/core/lib/gpr/murmur_hash.h",
"src/core/lib/gpr/spinlock.h",
"src/core/lib/gpr/string.h",
@ -1235,7 +1240,6 @@ config("grpc_config") {
"src/core/lib/gpr/tls_pthread.h",
"src/core/lib/gpr/tmpfile.h",
"src/core/lib/gpr/useful.h",
"src/core/lib/gprpp/abstract.h",
"src/core/lib/gprpp/arena.h",
"src/core/lib/gprpp/atomic.h",
"src/core/lib/gprpp/debug_location.h",
@ -1249,11 +1253,12 @@ config("grpc_config") {
"src/core/lib/gprpp/manual_constructor.h",
"src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/optional.h",
"src/core/lib/gprpp/orphanable.h",
"src/core/lib/gprpp/pair.h",
"src/core/lib/gprpp/ref_counted.h",
"src/core/lib/gprpp/ref_counted_ptr.h",
"src/core/lib/gprpp/set.h",
"src/core/lib/gprpp/string_view.h",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
@ -1397,6 +1402,9 @@ config("grpc_config") {
"src/cpp/common/secure_auth_context.h",
"src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc",
"src/cpp/common/tls_credentials_options.cc",
"src/cpp/common/tls_credentials_options_util.cc",
"src/cpp/common/tls_credentials_options_util.h",
"src/cpp/common/validate_service_config.cc",
"src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",

File diff suppressed because it is too large Load Diff

@ -1,6 +1,8 @@
# How to contribute
We definitely welcome your patches and contributions to gRPC!
We definitely welcome your patches and contributions to gRPC! Please read the gRPC
organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md)
and [contribution guidelines](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md) before proceeding.
If you are new to github, please start by reading [Pull Request
howto](https://help.github.com/articles/about-pull-requests/)

@ -0,0 +1 @@
This repository is governed by the gRPC organization's [governance rules](https://github.com/grpc/grpc-community/blob/master/governance.md).

@ -0,0 +1,82 @@
This page lists all active maintainers of this repository. If you were a
maintainer and would like to add your name to the Emeritus list, please send us a
PR.
See [GOVERNANCE.md](https://github.com/grpc/grpc-community/blob/master/governance.md)
for governance guidelines and how to become a maintainer.
See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIBUTING.md)
for general contribution guidelines.
## Maintainers (in alphabetical order)
- [a11r](https://github.com/a11r), Google LLC
- [apolcyn](https://github.com/apolcyn), Google LLC
- [arjunroy](https://github.com/arjunroy), Google LLC
- [AspirinSJL](https://github.com/AspirinSJL), Google LLC
- [bogdandrutu](https://github.com/bogdandrutu), Google LLC
- [daniel-j-born](https://github.com/daniel-j-born), Google LLC
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
- [dfawley](https://github.com/dfawley), Google LLC
- [dklempner](https://github.com/dklempner), Google LLC
- [ejona86](https://github.com/ejona86), Google LLC
- [gnossen](https://github.com/gnossen), Google LLC
- [guantaol](https://github.com/guantaol), Google LLC
- [hcaseyal](https://github.com/hcaseyal), Google LLC
- [jboeuf](https://github.com/jboeuf), Google LLC
- [jiangtaoli2016](https://github.com/jiangtaoli2016), Google LLC
- [jkolhe](https://github.com/jkolhe), Google LLC
- [jtattermusch](https://github.com/jtattermusch), Google LLC
- [karthikravis](https://github.com/karthikravis), Google LLC
- [kumaralokgithub](https://github.com/kumaralokgithub), Google LLC
- [lidizheng](https://github.com/lidizheng), Google LLC
- [markdroth](https://github.com/markdroth), Google LLC
- [matthewstevenson88](https://github.com/matthewstevenson88), Google LLC
- [mehrdada](https://github.com/mehrdada), Dropbox, Inc.
- [mhaidrygoog](https://github.com/mhaidrygoog), Google LLC
- [murgatroid99](https://github.com/murgatroid99), Google LLC
- [muxi](https://github.com/muxi), Google LLC
- [nanahpang](https://github.com/nanahpang), Google LLC
- [nathanielmanistaatgoogle](https://github.com/nathanielmanistaatgoogle), Google LLC
- [nicolasnoble](https://github.com/nicolasnoble), Google LLC
- [qixuanl1](https://github.com/qixuanl1), Google LLC
- [ran-su](https://github.com/ran-su), Google LLC
- [rmstar](https://github.com/rmstar), Google LLC
- [sanjaypujare](https://github.com/sanjaypujare), Google LLC
- [sheenaqotj](https://github.com/sheenaqotj), Google LLC
- [soheilhy](https://github.com/soheilhy), Google LLC
- [sreecha](https://github.com/sreecha), LinkedIn
- [srini100](https://github.com/srini100), Google LLC
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
- [veblush](https://github.com/veblush), Google LLC
- [vishalpowar](https://github.com/vishalpowar), Google LLC
- [Vizerai](https://github.com/Vizerai), Google LLC
- [vjpai](https://github.com/vjpai), Google LLC
- [wcevans](https://github.com/wcevans), Google LLC
- [wenbozhu](https://github.com/wenbozhu), Google LLC
- [yang-g](https://github.com/yang-g), Google LLC
- [yashykt](https://github.com/yashykt), Google LLC
- [yihuazhang](https://github.com/yihuazhang), Google LLC
- [ZhouyihaiDing](https://github.com/ZhouyihaiDing), Google LLC
## Emeritus Maintainers (in alphabetical order)
- [adelez](https://github.com/adelez), Google LLC
- [billfeng327](https://github.com/billfeng327), Google LLC
- [ctiller](https://github.com/ctiller), Google LLC
- [dgquintas](https://github.com/dgquintas), Google LLC
- [ericgribkoff](https://github.com/ericgribkoff), Google LLC
- [fengli79](https://github.com/fengli79), Google LLC
- [jcanizales](https://github.com/jcanizales), Google LLC
- [jpalmerLinuxFoundation](https://github.com/jpalmerLinuxFoundation), Linux Foundation
- [justinburke](https://github.com/justinburke), Google LLC
- [kpayson64](https://github.com/kpayson64), Google LLC
- [lyuxuan](https://github.com/lyuxuan), Google LLC
- [matt-kwong](https://github.com/matt-kwong), Google LLC
- [mit-mit](https://github.com/mit-mit), Google LLC
- [mpwarres](https://github.com/mpwarres), Google LLC
- [ncteisen](https://github.com/ncteisen), Google LLC
- [pmarks-net](https://github.com/pmarks-net), Google LLC
- [slash-lib](https://github.com/slash-lib), Google LLC
- [soltanmm](https://github.com/soltanmm), Google LLC
- [summerxyt](https://github.com/summerxyt), Google LLC
- [y-zeng](https://github.com/y-zeng), Google LLC
- [zpencer](https://github.com/zpencer), Google LLC

File diff suppressed because it is too large Load Diff

@ -72,14 +72,14 @@ Libraries in different languages may be in various states of development. We are
| Ruby | [src/ruby](src/ruby) |
| Python | [src/python](src/python) |
| PHP | [src/php](src/php) |
| C# | [src/csharp](src/csharp) |
| C# (core library based) | [src/csharp](src/csharp) |
| Objective-C | [src/objective-c](src/objective-c) |
| Language | Source repo |
|-------------------------|------------------------------------------------------|
| Java | [grpc-java](http://github.com/grpc/grpc-java) |
| Go | [grpc-go](http://github.com/grpc/grpc-go) |
| Java | [grpc-java](https://github.com/grpc/grpc-java) |
| Go | [grpc-go](https://github.com/grpc/grpc-go) |
| NodeJS | [grpc-node](https://github.com/grpc/grpc-node) |
| WebJS | [grpc-web](https://github.com/grpc/grpc-web) |
| Dart | [grpc-dart](https://github.com/grpc/grpc-dart) |
| .NET (pure C# impl.) | [grpc-dotnet](https://github.com/grpc/grpc-dotnet) |

@ -51,6 +51,9 @@ load("@grpc_python_dependencies//:requirements.bzl", "pip_install")
pip_repositories()
pip_install()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
upb_deps()

@ -24,7 +24,6 @@
#
load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle")
load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library")
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
@ -99,9 +98,6 @@ def grpc_cc_library(
"//:grpc_allow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=1"],
"//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"],
"//conditions:default": [],
}) + select({
"//:grpc_use_cpp_std_lib": ["GRPC_USE_CPP_STD_LIB=1"],
"//conditions:default": [],
}),
hdrs = hdrs + public_hdrs,
deps = deps + _get_external_deps(external_deps),
@ -185,17 +181,17 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
"exec_compatible_with": exec_compatible_with,
}
if uses_polling:
# Only run targets with pollers for non-MSVC
# TODO(yfen): Enable MSVC for poller-enabled targets without pollers
# the vanilla version of the test should run on platforms that only
# support a single poller
native.cc_test(
name = name,
testonly = True,
tags = [
"manual",
"no_windows",
],
tags = (tags + [
"no_linux", # linux supports multiple pollers
]),
**args
)
# on linux we run the same test multiple times, once for each poller
for poller in POLLERS:
native.sh_test(
name = name + "@poller=" + poller,
@ -209,11 +205,12 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
poller,
"$(location %s)" % name,
] + args["args"],
tags = (tags + ["no_windows"]),
tags = (tags + ["no_windows", "no_mac"]),
exec_compatible_with = exec_compatible_with,
)
else:
native.cc_test(tags = tags, **args)
# the test behavior doesn't depend on polling, just generate the test
native.cc_test(name = name, tags = tags, **args)
ios_cc_test(
name = name,
tags = tags,
@ -239,19 +236,13 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
)
def grpc_generate_one_off_targets():
apple_resource_bundle(
# The choice of name is signicant here, since it determines the bundle name.
name = "gRPCCertificates",
resources = ["etc/roots.pem"],
)
# In open-source, grpc_objc* libraries depend directly on //:grpc
native.alias(
name = "grpc_objc",
actual = "//:grpc",
)
def grpc_objc_use_cronet_config():
def grpc_generate_objc_one_off_targets():
pass
def grpc_sh_test(name, srcs, args = [], data = []):
@ -269,13 +260,22 @@ def grpc_sh_binary(name, srcs, data = []):
data = data,
)
def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False):
def grpc_py_binary(name,
srcs,
data = [],
deps = [],
external_deps = [],
testonly = False,
python_version = "PY2",
**kwargs):
native.py_binary(
name = name,
srcs = srcs,
testonly = testonly,
data = data,
deps = deps + _get_external_deps(external_deps),
python_version = python_version,
**kwargs
)
def grpc_package(name, visibility = "private", features = []):
@ -296,7 +296,7 @@ def grpc_package(name, visibility = "private", features = []):
def grpc_objc_library(
name,
srcs,
srcs = [],
hdrs = [],
textual_hdrs = [],
data = [],
@ -333,3 +333,10 @@ def grpc_objc_library(
def grpc_upb_proto_library(name, deps):
upb_proto_library(name = name, deps = deps)
def python_config_settings():
native.config_setting(
name = "python3",
flag_values = {"@bazel_tools//tools/python:python_version": "PY3"},
)

@ -1,6 +1,5 @@
"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
@ -151,9 +150,9 @@ def grpc_deps():
if "com_github_google_benchmark" not in native.existing_rules():
http_archive(
name = "com_github_google_benchmark",
sha256 = "c7682e9007ddfd94072647abab3e89ffd9084089460ae47d67060974467b58bf",
strip_prefix = "benchmark-e776aa0275e293707b6a0901e0e8d8a8a3679508",
url = "https://github.com/google/benchmark/archive/e776aa0275e293707b6a0901e0e8d8a8a3679508.tar.gz",
sha256 = "f68aec93154d010324c05bcd8c5cc53468b87af88d87acb5ddcfaa1bba044837",
strip_prefix = "benchmark-090faecb454fbd6e6e17a75ef8146acb037118d4",
url = "https://github.com/google/benchmark/archive/090faecb454fbd6e6e17a75ef8146acb037118d4.tar.gz",
)
if "com_github_cares_cares" not in native.existing_rules():
@ -174,21 +173,25 @@ def grpc_deps():
)
if "bazel_toolchains" not in native.existing_rules():
# list of releases is at https://releases.bazel.build/bazel-toolchains.html
http_archive(
name = "bazel_toolchains",
sha256 = "d968b414b32aa99c86977e1171645d31da2b52ac88060de3ac1e49932d5dcbf1",
strip_prefix = "bazel-toolchains-4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47",
sha256 = "22ca5b8115c8673ecb627a02b606529e813961e447933863fccdf325cc5f999f",
strip_prefix = "bazel-toolchains-0.29.5",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/releases/download/0.29.5/bazel-toolchains-0.29.5.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.29.5.tar.gz",
],
)
if "bazel_skylib" not in native.existing_rules():
git_repository(
http_archive(
name = "bazel_skylib",
remote = "https://github.com/bazelbuild/bazel-skylib",
tag = "0.9.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
],
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
)
if "io_opencensus_cpp" not in native.existing_rules():
@ -201,9 +204,9 @@ def grpc_deps():
if "upb" not in native.existing_rules():
http_archive(
name = "upb",
sha256 = "95150db57b51b65f3422c38953956e0f786945d842d76f8ab685fbcd93ab5caa",
strip_prefix = "upb-931bbecbd3230ae7f22efa5d203639facc47f719",
url = "https://github.com/protocolbuffers/upb/archive/931bbecbd3230ae7f22efa5d203639facc47f719.tar.gz",
sha256 = "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454",
strip_prefix = "upb-9effcbcb27f0a665f9f345030188c0b291e32482",
url = "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz",
)
if "envoy_api" not in native.existing_rules():
http_archive(
@ -221,10 +224,11 @@ def grpc_deps():
)
if "build_bazel_rules_apple" not in native.existing_rules():
git_repository(
http_archive(
name = "build_bazel_rules_apple",
remote = "https://github.com/bazelbuild/rules_apple.git",
tag = "0.17.2",
url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
)
grpc_python_deps()

@ -1,6 +1,5 @@
"""Load dependencies needed to compile and test the grpc python library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@com_github_grpc_grpc//third_party/py:python_configure.bzl", "python_configure")
@ -41,10 +40,18 @@ def grpc_python_deps():
)
if "io_bazel_rules_python" not in native.existing_rules():
git_repository(
http_archive(
name = "io_bazel_rules_python",
commit = "fdbb17a4118a1728d19e638a5291b4c4266ea5b8",
remote = "https://github.com/bazelbuild/rules_python.git",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
)
if "rules_python" not in native.existing_rules():
http_archive(
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
sha256 = "f7402f11691d657161f871e11968a984e5b48b023321935f5a55d7e56cf4758a",
strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
)
python_configure(name = "local_config_python")

@ -5,7 +5,6 @@ load(
"get_include_directory",
"get_plugin_args",
"get_proto_root",
"proto_path_to_generated_filename",
"protos_from_context",
"includes_from_deps",
"get_proto_arguments",
@ -94,11 +93,13 @@ def _generate_pb2_grpc_src_impl(context):
proto_root = get_proto_root(context.label.workspace_root)
out_files = declare_out_files(protos, context, _GENERATED_GRPC_PROTO_FORMAT)
plugin_flags = ["grpc_2_0"] + context.attr.strip_prefixes
arguments = []
tools = [context.executable._protoc, context.executable._plugin]
arguments += get_plugin_args(
context.executable._plugin,
[],
plugin_flags,
get_out_dir(protos, context),
False,
)
@ -127,6 +128,7 @@ _generate_pb2_grpc_src = rule(
allow_empty = False,
providers = [ProtoInfo],
),
"strip_prefixes": attr.string_list(),
"_plugin": attr.label(
executable = True,
providers = ["files_to_run"],
@ -147,6 +149,7 @@ def py_grpc_library(
name,
srcs,
deps,
strip_prefixes = [],
**kwargs):
"""Generate python code for gRPC services defined in a protobuf.
@ -156,6 +159,12 @@ def py_grpc_library(
schema of the service.
deps: (List of `labels`) a single py_proto_library target for the
proto_library in `srcs`.
strip_prefixes: (List of `strings`) If provided, this prefix will be
stripped from the beginning of foo_pb2 modules imported by the
generated stubs. This is useful in combination with the `imports`
attribute of the `py_library` rule.
**kwargs: Additional arguments to be supplied to the invocation of
py_library.
"""
codegen_grpc_target = "_{}_grpc_codegen".format(name)
if len(srcs) != 1:
@ -167,6 +176,7 @@ def py_grpc_library(
_generate_pb2_grpc_src(
name = codegen_grpc_target,
deps = srcs,
strip_prefixes = strip_prefixes,
**kwargs
)
@ -178,3 +188,37 @@ def py_grpc_library(
deps = [Label("//src/python/grpcio/grpc:grpcio")] + deps,
**kwargs
)
def py2and3_test(name,
py_test = native.py_test,
**kwargs):
"""Runs a Python test under both Python 2 and Python 3.
Args:
name: The name of the test.
py_test: The rule to use for each test.
**kwargs: Keyword arguments passed directly to the underlying py_test
rule.
"""
if "python_version" in kwargs:
fail("Cannot specify 'python_version' in py2and3_test.")
names = [name + suffix for suffix in (".python2", ".python3")]
python_versions = ["PY2", "PY3"]
for case_name, python_version in zip(names, python_versions):
py_test(
name = case_name,
python_version = python_version,
**kwargs
)
suite_kwargs = {}
if "visibility" in kwargs:
suite_kwargs["visibility"] = kwargs["visibility"]
native.test_suite(
name = name,
tests = names,
**suite_kwargs
)

@ -6,6 +6,9 @@ local_repository(
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# TODO(https://github.com/grpc/grpc/issues/19835): Remove.
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
upb_deps()

@ -14,8 +14,8 @@ settings:
'#10': See the expand_version.py for all the quirks here
core_version: 8.0.0
csharp_major_version: 2
g_stands_for: ganges
version: 1.24.0-dev
g_stands_for: game
version: 1.25.0-dev
filegroups:
- name: alts_tsi
headers:
@ -217,7 +217,6 @@ filegroups:
- src/core/lib/gpr/log_linux.cc
- src/core/lib/gpr/log_posix.cc
- src/core/lib/gpr/log_windows.cc
- src/core/lib/gpr/mpscq.cc
- src/core/lib/gpr/murmur_hash.cc
- src/core/lib/gpr/string.cc
- src/core/lib/gpr/string_posix.cc
@ -239,6 +238,7 @@ filegroups:
- src/core/lib/gprpp/fork.cc
- src/core/lib/gprpp/global_config_env.cc
- src/core/lib/gprpp/host_port.cc
- src/core/lib/gprpp/mpscq.cc
- src/core/lib/gprpp/thd_posix.cc
- src/core/lib/gprpp/thd_windows.cc
- src/core/lib/profiling/basic_timers.cc
@ -268,7 +268,6 @@ filegroups:
- src/core/lib/gpr/alloc.h
- src/core/lib/gpr/arena.h
- src/core/lib/gpr/env.h
- src/core/lib/gpr/mpscq.h
- src/core/lib/gpr/murmur_hash.h
- src/core/lib/gpr/spinlock.h
- src/core/lib/gpr/string.h
@ -280,7 +279,6 @@ filegroups:
- src/core/lib/gpr/tls_pthread.h
- src/core/lib/gpr/tmpfile.h
- src/core/lib/gpr/useful.h
- src/core/lib/gprpp/abstract.h
- src/core/lib/gprpp/arena.h
- src/core/lib/gprpp/atomic.h
- src/core/lib/gprpp/fork.h
@ -292,7 +290,8 @@ filegroups:
- src/core/lib/gprpp/manual_constructor.h
- src/core/lib/gprpp/map.h
- src/core/lib/gprpp/memory.h
- src/core/lib/gprpp/pair.h
- src/core/lib/gprpp/mpscq.h
- src/core/lib/gprpp/set.h
- src/core/lib/gprpp/sync.h
- src/core/lib/gprpp/thd.h
- src/core/lib/profiling/timers.h
@ -389,6 +388,7 @@ filegroups:
- include/grpcpp/impl/codegen/interceptor_common.h
- include/grpcpp/impl/codegen/message_allocator.h
- include/grpcpp/impl/codegen/metadata_map.h
- include/grpcpp/impl/codegen/method_handler.h
- include/grpcpp/impl/codegen/method_handler_impl.h
- include/grpcpp/impl/codegen/rpc_method.h
- include/grpcpp/impl/codegen/rpc_service_method.h
@ -515,6 +515,7 @@ filegroups:
- include/grpcpp/security/credentials_impl.h
- include/grpcpp/security/server_credentials.h
- include/grpcpp/security/server_credentials_impl.h
- include/grpcpp/security/tls_credentials_options.h
- include/grpcpp/server.h
- include/grpcpp/server_builder.h
- include/grpcpp/server_builder_impl.h
@ -1124,38 +1125,23 @@ filegroups:
- name: grpc_lb_policy_xds
headers:
- src/core/ext/filters/client_channel/lb_policy/xds/xds.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h
src:
- src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
plugin: grpc_lb_policy_xds
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- grpc_resolver_fake
- grpc_xds_client
- name: grpc_lb_policy_xds_secure
headers:
- src/core/ext/filters/client_channel/lb_policy/xds/xds.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h
src:
- src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
plugin: grpc_lb_policy_xds
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- grpc_resolver_fake
- grpc_secure
- grpc_xds_client_secure
- name: grpc_lb_subchannel_list
headers:
- src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
@ -1274,6 +1260,7 @@ filegroups:
- src/core/lib/security/security_connector/security_connector.h
- src/core/lib/security/security_connector/ssl/ssl_security_connector.h
- src/core/lib/security/security_connector/ssl_utils.h
- src/core/lib/security/security_connector/ssl_utils_config.h
- src/core/lib/security/security_connector/tls/spiffe_security_connector.h
- src/core/lib/security/transport/auth_filters.h
- src/core/lib/security/transport/secure_endpoint.h
@ -1309,6 +1296,7 @@ filegroups:
- src/core/lib/security/security_connector/security_connector.cc
- src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
- src/core/lib/security/security_connector/ssl_utils.cc
- src/core/lib/security/security_connector/ssl_utils_config.cc
- src/core/lib/security/security_connector/tls/spiffe_security_connector.cc
- src/core/lib/security/transport/client_auth_filter.cc
- src/core/lib/security/transport/secure_endpoint.cc
@ -1547,6 +1535,39 @@ filegroups:
uses:
- grpc_base
- grpc_server_backward_compatibility
- name: grpc_xds_client
headers:
- src/core/ext/filters/client_channel/xds/xds_api.h
- src/core/ext/filters/client_channel/xds/xds_channel.h
- src/core/ext/filters/client_channel/xds/xds_channel_args.h
- src/core/ext/filters/client_channel/xds/xds_client.h
- src/core/ext/filters/client_channel/xds/xds_client_stats.h
src:
- src/core/ext/filters/client_channel/xds/xds_api.cc
- src/core/ext/filters/client_channel/xds/xds_channel.cc
- src/core/ext/filters/client_channel/xds/xds_client.cc
- src/core/ext/filters/client_channel/xds/xds_client_stats.cc
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- name: grpc_xds_client_secure
headers:
- src/core/ext/filters/client_channel/xds/xds_api.h
- src/core/ext/filters/client_channel/xds/xds_channel.h
- src/core/ext/filters/client_channel/xds/xds_channel_args.h
- src/core/ext/filters/client_channel/xds/xds_client.h
- src/core/ext/filters/client_channel/xds/xds_client_stats.h
src:
- src/core/ext/filters/client_channel/xds/xds_api.cc
- src/core/ext/filters/client_channel/xds/xds_channel_secure.cc
- src/core/ext/filters/client_channel/xds/xds_client.cc
- src/core/ext/filters/client_channel/xds/xds_client_stats.cc
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- grpc_secure
- name: grpcpp_channelz_proto
src:
- src/proto/grpc/channelz/channelz.proto
@ -1624,32 +1645,6 @@ libs:
deps:
- grpc
secure: true
- name: cxxabi
build: private
language: c
src:
- third_party/libcxxabi/src/abort_message.cpp
- third_party/libcxxabi/src/cxa_aux_runtime.cpp
- third_party/libcxxabi/src/cxa_default_handlers.cpp
- third_party/libcxxabi/src/cxa_demangle.cpp
- third_party/libcxxabi/src/cxa_exception_storage.cpp
- third_party/libcxxabi/src/cxa_guard.cpp
- third_party/libcxxabi/src/cxa_handlers.cpp
- third_party/libcxxabi/src/cxa_noexception.cpp
- third_party/libcxxabi/src/cxa_thread_atexit.cpp
- third_party/libcxxabi/src/cxa_unexpected.cpp
- third_party/libcxxabi/src/cxa_vector.cpp
- third_party/libcxxabi/src/cxa_virtual.cpp
- third_party/libcxxabi/src/fallback_malloc.cpp
- third_party/libcxxabi/src/private_typeinfo.cpp
- third_party/libcxxabi/src/stdlib_exception.cpp
- third_party/libcxxabi/src/stdlib_new_delete.cpp
- third_party/libcxxabi/src/stdlib_stdexcept.cpp
- third_party/libcxxabi/src/stdlib_typeinfo.cpp
build_system:
- Makefile
defaults: cxxabi
secure: false
- name: gpr
build: all
language: c
@ -1822,6 +1817,7 @@ libs:
- include/grpcpp/impl/codegen/core_codegen.h
- src/cpp/client/secure_credentials.h
- src/cpp/common/secure_auth_context.h
- src/cpp/common/tls_credentials_options_util.h
- src/cpp/server/secure_server_credentials.h
src:
- src/cpp/client/insecure_credentials.cc
@ -1830,6 +1826,8 @@ libs:
- src/cpp/common/secure_auth_context.cc
- src/cpp/common/secure_channel_arguments.cc
- src/cpp/common/secure_create_auth_context.cc
- src/cpp/common/tls_credentials_options.cc
- src/cpp/common/tls_credentials_options_util.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/secure_server_credentials.cc
deps:
@ -2738,17 +2736,6 @@ targets:
- grpc_test_util_unsecure
- grpc_unsecure
uses_polling: false
- name: gpr_mpscq_test
cpu_cost: 30
build: test
language: c
src:
- test/core/gpr/mpscq_test.cc
deps:
- gpr
- grpc_test_util_unsecure
- grpc_unsecure
uses_polling: false
- name: gpr_spinlock_test
cpu_cost: 3
build: test
@ -3855,15 +3842,6 @@ targets:
exclude_iomgrs:
- uv
uses_polling: false
- name: transport_connectivity_state_test
build: test
language: c
src:
- test/core/transport/connectivity_state_test.cc
deps:
- grpc_test_util
- grpc
- gpr
- name: transport_metadata_test
build: test
language: c
@ -4755,7 +4733,7 @@ targets:
build: test
language: c++
src:
- src/proto/grpc/lb/v2/orca_load_report_for_test.proto
- src/proto/grpc/testing/xds/orca_load_report_for_test.proto
- test/cpp/end2end/client_lb_end2end_test.cc
deps:
- grpc++_test_util
@ -5001,6 +4979,17 @@ targets:
args:
- --generated_file_path=gens/src/proto/grpc/testing/
uses_polling: false
- name: gprpp_mpscq_test
cpu_cost: 30
build: test
language: c++
src:
- test/core/gprpp/mpscq_test.cc
deps:
- gpr
- grpc_test_util_unsecure
- grpc_unsecure
uses_polling: false
- name: grpc_alts_credentials_options_test
build: test
language: c++
@ -5022,20 +5011,6 @@ targets:
- grpc
- gpr
- grpc++_test_config
- name: grpc_core_map_test
gtest: true
build: test
language: c++
headers:
- test/core/gprpp/map_tester.h
src:
- test/core/gprpp/map_test.cc
deps:
- grpc_test_util
- grpc++
- grpc
- gpr
uses_polling: false
- name: grpc_cpp_plugin
build: protoc
language: c++
@ -5986,6 +5961,16 @@ targets:
- grpc++
- grpc
- gpr
- name: transport_connectivity_state_test
gtest: true
build: test
language: c++
src:
- test/core/transport/connectivity_state_test.cc
deps:
- grpc_test_util
- grpc
- gpr
- name: transport_pid_controller_test
build: test
language: c++
@ -6028,8 +6013,9 @@ targets:
build: test
language: c++
src:
- src/proto/grpc/lb/v2/eds_for_test.proto
- src/proto/grpc/lb/v2/lrs_for_test.proto
- src/proto/grpc/testing/xds/ads_for_test.proto
- src/proto/grpc/testing/xds/eds_for_test.proto
- src/proto/grpc/testing/xds/lrs_for_test.proto
- test/cpp/end2end/xds_end2end_test.cc
deps:
- grpc++_test_util
@ -6083,7 +6069,7 @@ configs:
-Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
LD: clang++
LDFLAGS: -fsanitize=address
LDFLAGS: fsanitize=address
LDXX: clang++
compile_the_world: true
test_environ:
@ -6137,13 +6123,14 @@ configs:
valgrind: --tool=memcheck --leak-check=full
msan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory -fsanitize-memory-track-origins
-fsanitize-memory-use-after-dtor -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0
-DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory
-fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer
-DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument
-fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
DEFINES: NDEBUG
LD: clang++
LDFLAGS: -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
LDFLAGS: -stdlib=libc++ -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
-fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDXX: clang++
compile_the_world: true
@ -6177,20 +6164,19 @@ configs:
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
ubsan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer
-Wno-unused-command-line-argument -Wvarargs
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined
-fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
CXX: clang++
DEFINES: NDEBUG GRPC_UBSAN
LD: clang++
LDFLAGS: -fsanitize=undefined,unsigned-integer-overflow
LDFLAGS: -stdlib=libc++ -fsanitize=undefined,unsigned-integer-overflow
LDXX: clang++
compile_the_world: true
test_environ:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
defaults:
ares:
CFLAGS: -Wno-sign-conversion $(if $(subst Darwin,,$(SYSTEM)),,-Wno-shorten-64-to-32)
$(if $(subst MINGW32,,$(SYSTEM)),-Wno-invalid-source-encoding,)
CFLAGS: -g
CPPFLAGS: -Ithird_party/cares -Ithird_party/cares/cares -fvisibility=hidden -D_GNU_SOURCE
$(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin) $(if $(subst
FreeBSD,,$(SYSTEM)),,-Ithird_party/cares/config_freebsd) $(if $(subst Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux)
@ -6199,28 +6185,17 @@ defaults:
benchmark:
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
boringssl:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas
-Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough
$(NO_W_EXTRA_SEMI)
CFLAGS: -g
CPPFLAGS: -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-rtti -fno-exceptions
cxxabi:
CPPFLAGS: -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_NO_EXCEPTIONS
-Ithird_party/libcxxabi/include -nostdinc++ -Ithird_party/libcxx/include $(W_NO_UNUSED_BUT_SET_VARIABLE)
$(W_NO_MAYBE_UNINITIALIZED) -fvisibility=hidden
CXXFLAGS: $(W_NO_CXX14_COMPAT)
CXXFLAGS: -fno-exceptions
global:
COREFLAGS: -fno-rtti -fno-exceptions
CPPFLAGS: -g -Wall -Wextra -Werror $(W_NO_UNKNOWN_WARNING_OPTION) -Wno-long-long
-Wno-unused-parameter -Wno-deprecated-declarations -Wno-sign-conversion -Wno-shadow
-Wno-conversion -Wno-implicit-fallthrough -Wno-sign-compare -Wno-missing-field-initializers
-Wno-maybe-uninitialized -DOSATOMIC_USE_INLINED=1 -Ithird_party/upb -Isrc/core/ext/upb-generated
CXXFLAGS: -Wnon-virtual-dtor
CFLAGS: -g
COREFLAGS: -fno-exceptions
CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/upb -Isrc/core/ext/upb-generated
LDFLAGS: -g
zlib:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration
-Wno-implicit-fallthrough $(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden
CFLAGS: -fvisibility=hidden
openssl_fallback:
base_uri: https://openssl.org/source/old/1.0.2/
extraction_dir: openssl-1.0.2f

@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: @PC_NAME@
Description: @PC_DESCRIPTION@
Version: @PC_VERSION@
Cflags: -I${includedir}
Requires: @PC_REQUIRES@
Libs: -L${libdir} @PC_LIB@
Libs.private: @PC_LIBS_PRIVATE@

@ -24,13 +24,17 @@ if test "$PHP_GRPC" != "no"; then
case $host in
*darwin*)
PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD)
;;
*)
PHP_ADD_LIBRARY(stdc++,1,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;
esac
PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc,
src/php/ext/grpc/byte_buffer.c \
src/php/ext/grpc/call.c \
@ -59,7 +63,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gpr/log_linux.cc \
src/core/lib/gpr/log_posix.cc \
src/core/lib/gpr/log_windows.cc \
src/core/lib/gpr/mpscq.cc \
src/core/lib/gpr/murmur_hash.cc \
src/core/lib/gpr/string.cc \
src/core/lib/gpr/string_posix.cc \
@ -81,6 +84,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gprpp/fork.cc \
src/core/lib/gprpp/global_config_env.cc \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/thd_posix.cc \
src/core/lib/gprpp/thd_windows.cc \
src/core/lib/profiling/basic_timers.cc \
@ -300,6 +304,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/security/security_connector/security_connector.cc \
src/core/lib/security/security_connector/ssl/ssl_security_connector.cc \
src/core/lib/security/security_connector/ssl_utils.cc \
src/core/lib/security/security_connector/ssl_utils_config.cc \
src/core/lib/security/security_connector/tls/spiffe_security_connector.cc \
src/core/lib/security/transport/client_auth_filter.cc \
src/core/lib/security/transport/secure_endpoint.cc \
@ -412,9 +417,10 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc \
src/core/ext/filters/client_channel/xds/xds_api.cc \
src/core/ext/filters/client_channel/xds/xds_channel_secure.cc \
src/core/ext/filters/client_channel/xds/xds_client.cc \
src/core/ext/filters/client_channel/xds/xds_client_stats.cc \
src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \
@ -737,6 +743,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/fake)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/sockaddr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/xds)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/xds)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_idle)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/deadline)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/http)

@ -33,7 +33,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gpr\\log_linux.cc " +
"src\\core\\lib\\gpr\\log_posix.cc " +
"src\\core\\lib\\gpr\\log_windows.cc " +
"src\\core\\lib\\gpr\\mpscq.cc " +
"src\\core\\lib\\gpr\\murmur_hash.cc " +
"src\\core\\lib\\gpr\\string.cc " +
"src\\core\\lib\\gpr\\string_posix.cc " +
@ -55,6 +54,7 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gprpp\\fork.cc " +
"src\\core\\lib\\gprpp\\global_config_env.cc " +
"src\\core\\lib\\gprpp\\host_port.cc " +
"src\\core\\lib\\gprpp\\mpscq.cc " +
"src\\core\\lib\\gprpp\\thd_posix.cc " +
"src\\core\\lib\\gprpp\\thd_windows.cc " +
"src\\core\\lib\\profiling\\basic_timers.cc " +
@ -274,6 +274,7 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\security\\security_connector\\security_connector.cc " +
"src\\core\\lib\\security\\security_connector\\ssl\\ssl_security_connector.cc " +
"src\\core\\lib\\security\\security_connector\\ssl_utils.cc " +
"src\\core\\lib\\security\\security_connector\\ssl_utils_config.cc " +
"src\\core\\lib\\security\\security_connector\\tls\\spiffe_security_connector.cc " +
"src\\core\\lib\\security\\transport\\client_auth_filter.cc " +
"src\\core\\lib\\security\\transport\\secure_endpoint.cc " +
@ -386,9 +387,10 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1\\load_balancer.upb.c " +
"src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_channel_secure.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_client_stats.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_load_balancer_api.cc " +
"src\\core\\ext\\filters\\client_channel\\xds\\xds_api.cc " +
"src\\core\\ext\\filters\\client_channel\\xds\\xds_channel_secure.cc " +
"src\\core\\ext\\filters\\client_channel\\xds\\xds_client.cc " +
"src\\core\\ext\\filters\\client_channel\\xds\\xds_client_stats.cc " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upb.c " +
@ -742,6 +744,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\fake");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\xds");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\xds");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_idle");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\deadline");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http");

@ -1,8 +1,8 @@
# Moving gRPC core to C++
October 2017
Originally written by ctiller, markdroth, and vjpai in October 2017
ctiller, markdroth, vjpai
Revised by veblush in October 2019
## Background and Goal
@ -10,10 +10,14 @@ gRPC core was originally written in C89 for several reasons
(possibility of kernel integration, ease of wrapping, compiler
support, etc). Over time, this was changed to C99 as all relevant
compilers in active use came to support C99 effectively.
[Now, gRPC core is C++](https://github.com/grpc/proposal/blob/master/L6-allow-c%2B%2B-in-grpc-core.md)
(although the code is still idiomatically C code) with C linkage for
public functions. Throughout all of these transitions, the public
header files are committed to remain in C89.
gRPC started allowing to use C++ with a couple of exceptions not to
have C++ library linked such as `libstdc++.so`.
(For more detail, see the [proposal](https://github.com/grpc/proposal/blob/master/L6-core-allow-cpp.md))
Finally gRPC became ready to use full C++11 with the standard library by the [proposal](https://github.com[/grpc/proposal/blob/master/L59-core-allow-cppstdlib.md).
Throughout all of these transitions, the public header files are committed to remain in C89.
The goal now is to make the gRPC core implementation true idiomatic
C++ compatible with
@ -21,24 +25,16 @@ C++ compatible with
## Constraints
- No use of standard library if it requires link-time dependency
- Standard library makes wrapping difficult/impossible and also reduces platform portability
- This takes precedence over using C++ style guide
- Limited use of standard library if it does not require link-time dependency
- We can use things from `std::` as long as they are header-only implementations.
- Since the standard library API does not specify whether any given part of the API is implemented header-only, the only way to know is to try using something and see if our tests fail.
- Since there is no guarantee that some header-only implementation in the standard library will remain header-only in the future, we should define our own API in lib/gprpp that is an alias for the thing we want to use in `std::` and use the gprpp API in core. That way, if we later need to stop using the thing from `std::`, we can replace the alias with our own implementation.
- But lambdas are ok
- As are third-party libraries that meet our build requirements (such as many parts of abseil)
- There will be some C++ features that don't work
- `new` and `delete`
- pure virtual functions are not allowed because the message that prints out "Pure Virtual Function called" is part of the standard library
- Make a `#define GRPC_ABSTRACT {GPR_ASSERT(false);}` instead of `= 0;`
- The sanity for making sure that we don't depend on libstdc++ is that at least some tests should explicitly not include it
- Most tests can migrate to use gtest
- There are tremendous # of code paths that can now be exposed to unit tests because of the use of gtest and C++
- But at least some tests should not use gtest
- Most of features available in C++11 are allowed to use but there are some exceptions
because gRPC should support old systems.
- Should be built with gcc 4.8, clang 3.3, and Visual C++ 2015.
- Should be run on Linux system with libstdc++ 6.0.9 to support
[manylinux1](https://www.python.org/dev/peps/pep-0513).
- This would limit us not to use modern C++11 standard library such as `filesystem`.
You can easily see whether PR is free from this issue by checking the result of
`Artifact Build Linux` test.
- `thread_local` is not allowed to use on Apple's products because their old OSes
(e.g. ios < 9.0) don't support `thread_local`.
## Roadmap
@ -59,6 +55,3 @@ C++ compatible with
ByteBuffer, ...)
- The C++ API implementation might directly start using
`grpc_transport_stream_op_batch` rather than the core surface `grpc_op`.
- Can we get wrapped languages to a point where we can statically link C++? This will take a year in probability but that would allow the use of `std::`
- Are there other environments that don't support std library, like maybe Android NDK?
- Probably, that might push things out to 18 months

@ -23,4 +23,5 @@
- 1.21 'g' stands for ['gandalf'](https://github.com/grpc/grpc/tree/v1.21.x)
- 1.22 'g' stands for ['gale'](https://github.com/grpc/grpc/tree/v1.22.x)
- 1.23 'g' stands for ['gangnam'](https://github.com/grpc/grpc/tree/v1.23.x)
- 1.24 'g' stands for ['ganges'](https://github.com/grpc/grpc/tree/master)
- 1.24 'g' stands for ['ganges'](https://github.com/grpc/grpc/tree/v1.24.x)
- 1.25 'g' stands for ['game'](https://github.com/grpc/grpc/tree/master)

@ -1121,7 +1121,7 @@ for the `SimpleRequest.response_type`. If the server does not support the
Server gets the default SimpleRequest proto as the request. The content of the
request is ignored. It returns the SimpleResponse proto with the payload set
to current timestamp. The timestamp is an integer representing current time
with nanosecond resolution. This integer is formated as ASCII decimal in the
with nanosecond resolution. This integer is formatted as ASCII decimal in the
response. The format is not really important as long as the response payload
is different for each request. In addition it adds
1. cache control headers such that the response can be cached by proxies in
@ -1172,7 +1172,7 @@ responses, it closes with OK.
### Echo Status
[Echo Status]: #echo-status
When the client sends a response_status in the request payload, the server closes
the stream with the status code and messsage contained within said response_status.
the stream with the status code and message contained within said response_status.
The server will not process any further messages on the stream sent by the client.
This can be used by clients to verify correct handling of different status codes and
associated status messages end-to-end.
@ -1189,7 +1189,7 @@ key and the corresponding value back to the client as trailing metadata.
[Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us
In StreamingOutputCall and FullDuplexCall, server delays sending a
StreamingOutputCallResponse by the ResponseParameters's `interval_us` for that
StreamingOutputCallResponse by the ResponseParameters' `interval_us` for that
particular response, relative to the last response sent. That is, `interval_us`
acts like a sleep *before* sending the response and accumulates from one
response to the next.

@ -1,4 +1,4 @@
# Keepalive User Guide for gRPC Core (and dependants)
# Keepalive User Guide for gRPC Core (and dependents)
The keepalive ping is a way to check if a channel is currently working by sending HTTP2 pings over the transport. It is sent periodically, and if the ping is not acknowledged by the peer within a certain timeout period, the transport is disconnected.

@ -178,15 +178,12 @@ descriptor database.
desc_pool->FindMethodByName("helloworld.Greeter.SayHello");
```
* Get message type descriptors.
* Get message type descriptors and create messages dynamically.
```c++
const google::protobuf::Descriptor* request_desc =
desc_pool->FindMessageTypeByName("helloworld.HelloRequest");
google::protobuf::DynamicMessageFactory dmf;
google::protobuf::Message* request = dmf.GetPrototype(request_desc)->New();
```
* Feed [google::protobuf::DynamicMessageFactory](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.dynamic_message#DynamicMessageFactory).
```c++
google::protobuf::DynamicMessageFactory(&desc_pool);
```

@ -2,7 +2,7 @@ Server-side API for Authenticating Clients
==========================================
NOTE: This document describes how server-side authentication works in C-core based gRPC implementations only. In gRPC Java and Go, server side authentication is handled differently.
NOTE2: `CallCredentials` class is only valid for secure channels in C-Core. So, for connections under insecure channels, features below might not be avaiable.
NOTE2: `CallCredentials` class is only valid for secure channels in C-Core. So, for connections under insecure channels, features below might not be available.
## AuthContext

@ -774,36 +774,6 @@ vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
+OkuE6N36B9K
-----END CERTIFICATE-----
# Issuer: CN=Class 2 Primary CA O=Certplus
# Subject: CN=Class 2 Primary CA O=Certplus
# Label: "Certplus Class 2 Primary CA"
# Serial: 177770208045934040241468760488327595043
# MD5 Fingerprint: 88:2c:8c:52:b8:a2:3c:f3:f7:bb:03:ea:ae:ac:42:0b
# SHA1 Fingerprint: 74:20:74:41:72:9c:dd:92:ec:79:31:d8:23:10:8d:c2:81:92:e2:bb
# SHA256 Fingerprint: 0f:99:3c:8a:ef:97:ba:af:56:87:14:0e:d5:9a:d1:82:1b:b4:af:ac:f0:aa:9a:58:b5:d5:7a:33:8a:3a:fb:cb
-----BEGIN CERTIFICATE-----
MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAw
PTELMAkGA1UEBhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFz
cyAyIFByaW1hcnkgQ0EwHhcNOTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9
MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2VydHBsdXMxGzAZBgNVBAMTEkNsYXNz
IDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANxQ
ltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR5aiR
VhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyL
kcAbmXuZVg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCd
EgETjdyAYveVqUSISnFOYFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yas
H7WLO7dDWWuwJKZtkIvEcupdM5i3y95ee++U8Rs+yskhwcWYAqqi9lt3m/V+llU0
HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRMECDAGAQH/AgEKMAsGA1Ud
DwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJYIZIAYb4
QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMu
Y29tL0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/
AN9WM2K191EBkOvDP9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8
yfFC82x/xXp8HVGIutIKPidd3i1RTtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMR
FcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+7UCmnYR0ObncHoUW2ikbhiMA
ybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW//1IMwrh3KWB
kJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
l7+ijrRU
-----END CERTIFICATE-----
# Issuer: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Subject: CN=DST Root CA X3 O=Digital Signature Trust Co.
# Label: "DST Root CA X3"
@ -1222,36 +1192,6 @@ t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----
# Issuer: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Subject: CN=Deutsche Telekom Root CA 2 O=Deutsche Telekom AG OU=T-TeleSec Trust Center
# Label: "Deutsche Telekom Root CA 2"
# Serial: 38
# MD5 Fingerprint: 74:01:4a:91:b1:08:c4:58:ce:47:cd:f0:dd:11:53:08
# SHA1 Fingerprint: 85:a4:08:c0:9c:19:3e:5d:51:58:7d:cd:d6:13:30:fd:8c:de:37:bf
# SHA256 Fingerprint: b6:19:1a:50:d0:c3:97:7f:7d:a9:9b:cd:aa:c8:6a:22:7d:ae:b9:67:9e:c7:0b:a3:b0:c9:d9:22:71:c1:70:d3
-----BEGIN CERTIFICATE-----
MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEc
MBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2Vj
IFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENB
IDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5MjM1OTAwWjBxMQswCQYDVQQGEwJE
RTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxl
U2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290
IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEU
ha88EOQ5bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhC
QN/Po7qCWWqSG6wcmtoIKyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1Mjwr
rFDa1sPeg5TKqAyZMg4ISFZbavva4VhYAUlfckE8FQYBjl2tqriTtM2e66foai1S
NNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aKSe5TBY8ZTNXeWHmb0moc
QqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTVjlsB9WoH
txa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAP
BgNVHRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOC
AQEAlGRZrTlk5ynrE/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756Abrsp
tJh6sTtU6zkXR34ajgv8HzFZMQSyzhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpa
IzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8rZ7/gFnkm0W09juwzTkZmDLl
6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4Gdyd1Lx+4ivn+
xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
Cm26OWMohpLzGITY+9HPBVZkVw==
-----END CERTIFICATE-----
# Issuer: CN=Cybertrust Global Root O=Cybertrust, Inc
# Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
# Label: "Cybertrust Global Root"
@ -3495,46 +3435,6 @@ AAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3CekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ
5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
-----END CERTIFICATE-----
# Issuer: CN=Certinomis - Root CA O=Certinomis OU=0002 433998903
# Subject: CN=Certinomis - Root CA O=Certinomis OU=0002 433998903
# Label: "Certinomis - Root CA"
# Serial: 1
# MD5 Fingerprint: 14:0a:fd:8d:a8:28:b5:38:69:db:56:7e:61:22:03:3f
# SHA1 Fingerprint: 9d:70:bb:01:a5:a4:a0:18:11:2e:f7:1c:01:b9:32:c5:34:e7:88:a8
# SHA256 Fingerprint: 2a:99:f5:bc:11:74:b7:3c:bb:1d:62:08:84:e0:1c:34:e5:1c:cb:39:78:da:12:5f:0e:33:26:88:83:bf:41:58
-----BEGIN CERTIFICATE-----
MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjET
MBEGA1UEChMKQ2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAb
BgNVBAMTFENlcnRpbm9taXMgLSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMz
MTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMx
FzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRDZXJ0aW5vbWlzIC0g
Um9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQosP5L2
fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJfl
LieY6pOod5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQV
WZUKxkd8aRi5pwP5ynapz8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDF
TKWrteoB4owuZH9kb/2jJZOLyKIOSY008B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb
5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09xRLWtwHkziOC/7aOgFLSc
CbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE6OXWk6Ri
wsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJ
wx3tFvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SG
m/lg0h9tkQPTYKbVPZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4
F2iw4lNVYC2vPsKD2NkJK/DAZNuHi5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZng
WVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIB
BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I6tNxIqSSaHh0
2TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/
0KGRHCwPT5iVWVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWw
F6YSjNRieOpWauwK0kDDPAUwPk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZS
g081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAXlCOotQqSD7J6wWAsOMwaplv/8gzj
qh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJy29SWwNyhlCVCNSN
h4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9Iff/
ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8V
btaw5BngDwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwj
Y/M50n92Uaf0yKHxDHYiI0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ
8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nMcyrDflOR1m749fPH0FFNjkulW+YZFzvW
gQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVrhkIGuUE=
-----END CERTIFICATE-----
# Issuer: CN=OISTE WISeKey Global Root GB CA O=WISeKey OU=OISTE Foundation Endorsed
# Subject: CN=OISTE WISeKey Global Root GB CA O=WISeKey OU=OISTE Foundation Endorsed
# Label: "OISTE WISeKey Global Root GB CA"

@ -0,0 +1,8 @@
*.o
*.pb.cc
*.pb.h
greeter_client
greeter_server
greeter_async_client
greeter_async_client2
greeter_async_server

@ -20,12 +20,12 @@ CXX = g++
CPPFLAGS += `pkg-config --cflags protobuf grpc`
CXXFLAGS += -std=c++11
ifeq ($(SYSTEM),Darwin)
LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\
LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++`\
-pthread\
-lgrpc++_reflection\
-ldl
else
LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc`\
LDFLAGS += -L/usr/local/lib `pkg-config --libs protobuf grpc++`\
-pthread\
-Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed\
-ldl

@ -5,9 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
<PackageReference Include="Grpc" Version="1.17.0" />
<PackageReference Include="Grpc.Tools" Version="1.17.0" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" Version="3.8.0" />
<PackageReference Include="Grpc" Version="2.23.0" />
<PackageReference Include="Grpc.Tools" Version="2.23.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.props" Condition="Exists('..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.props')" />
<PropertyGroup>
@ -33,18 +33,26 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.8.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.8.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.17.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.2.23.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.Api.2.23.0\lib\net45\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll</HintPath>
<Private>True</Private>
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard1.1\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@ -57,14 +65,14 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.props'))" />
<Error Condition="!Exists('..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets'))" />
</Target>
<Import Project="..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.targets" Condition="Exists('..\packages\Grpc.Tools.1.17.0\build\Grpc.Tools.targets')" />
</Project>
<Import Project="..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" />
</Project>

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.6.1" targetFramework="net45" />
<package id="Grpc" version="1.17.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.17.0" targetFramework="net45" />
<package id="Google.Protobuf" version="3.8.0" targetFramework="net45" />
<package id="Grpc" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core.Api" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Tools" version="1.17.0" targetFramework="net45" developmentDependency="true" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>
<package id="System.Buffers" version="4.4.0" targetFramework="net45" />
<package id="System.Memory" version="4.5.3" targetFramework="net45" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net45" />
</packages>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -32,18 +32,26 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.8.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.8.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.17.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.2.23.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.Api.2.23.0\lib\net45\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll</HintPath>
<Private>True</Private>
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard1.1\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
@ -59,11 +67,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.6.1" targetFramework="net45" />
<package id="Grpc" version="1.17.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.17.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
<package id="Google.Protobuf" version="3.8.0" targetFramework="net45" />
<package id="Grpc" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core.Api" version="2.23.0" targetFramework="net45" />
<package id="System.Buffers" version="4.4.0" targetFramework="net45" />
<package id="System.Memory" version="4.5.3" targetFramework="net45" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net45" />
</packages>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -32,18 +32,26 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.8.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.8.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.17.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.2.23.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.Api.2.23.0\lib\net45\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll</HintPath>
<Private>True</Private>
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard1.1\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
@ -59,11 +67,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.17.0\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.2.23.0\build\net45\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.6.1" targetFramework="net45" />
<package id="Grpc" version="1.17.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.17.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
<package id="Google.Protobuf" version="3.8.0" targetFramework="net45" />
<package id="Grpc" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core" version="2.23.0" targetFramework="net45" />
<package id="Grpc.Core.Api" version="2.23.0" targetFramework="net45" />
<package id="System.Buffers" version="4.4.0" targetFramework="net45" />
<package id="System.Memory" version="4.5.3" targetFramework="net45" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net45" />
</packages>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -15,7 +15,8 @@
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -38,7 +39,25 @@
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.8.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.8.0\lib\netstandard2.0\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.2.23.0\lib\netstandard2.0\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.Api.2.23.0\lib\netstandard2.0\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
@ -50,12 +69,6 @@
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\System.Interactive.Async.3.1.1\lib\netstandard1.3\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.6.0\lib\netstandard1.0\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.1.18.0\lib\netstandard1.5\Grpc.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
@ -63,6 +76,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="Assets\AboutAssets.txt" />
@ -79,5 +93,11 @@
</ItemGroup>
<Import Project="..\HelloworldXamarin\HelloworldXamarin.projitems" Label="Shared" Condition="Exists('..\HelloworldXamarin\HelloworldXamarin.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.1.18.0\build\MonoAndroid10\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.18.0\build\MonoAndroid10\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.2.23.0\build\MonoAndroid10\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\MonoAndroid10\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.2.23.0\build\MonoAndroid10\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.2.23.0\build\MonoAndroid10\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="io.grpc.examples.HelloworldXamarin">
<uses-sdk android:minSdkVersion="15" />
<application android:label="HelloworldXamarin">
</application>
</manifest>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27" />
<application android:label="HelloworldXamarin"></application>
</manifest>

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.6.0" targetFramework="monoandroid81" />
<package id="Grpc.Core" version="1.18.0" targetFramework="monoandroid81" />
<package id="Google.Protobuf" version="3.8.0" targetFramework="monoandroid81" />
<package id="Grpc.Core" version="2.23.0" targetFramework="monoandroid81" />
<package id="Grpc.Core.Api" version="2.23.0" targetFramework="monoandroid81" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="monoandroid81" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid81" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="monoandroid81" />
<package id="System.AppContext" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Buffers" version="4.4.0" targetFramework="monoandroid81" />
<package id="System.Collections" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Console" version="4.3.0" targetFramework="monoandroid81" />
@ -22,6 +24,7 @@
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Linq" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Memory" version="4.5.3" targetFramework="monoandroid81" />
<package id="System.Net.Http" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid81" />
@ -31,6 +34,7 @@
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Runtime" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="monoandroid81" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="monoandroid81" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="monoandroid81" />

@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 15
VisualStudioVersion = 15.0.28307.329
MinimumVisualStudioVersion = 10.0.40219.1
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "HelloworldXamarin", "HelloworldXamarin\HelloworldXamarin.shproj", "{42FFF3D8-934F-4475-8E68-08DA340BF6E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloworldXamarin.Droid", "Droid\HelloworldXamarin.Droid.csproj", "{B9B0D41C-1C07-4590-A919-5865E741B2EA}"
@ -8,38 +9,49 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloworldXamarin.iOS", "iOS\HelloworldXamarin.iOS.csproj", "{62336DF0-60D8-478F-8140-B3CB089B417E}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
HelloworldXamarin\HelloworldXamarin.projitems*{42fff3d8-934f-4475-8e68-08da340bf6e8}*SharedItemsImports = 13
HelloworldXamarin\HelloworldXamarin.projitems*{62336df0-60d8-478f-8140-b3cb089b417e}*SharedItemsImports = 4
HelloworldXamarin\HelloworldXamarin.projitems*{b9b0d41c-1c07-4590-a919-5865e741b2ea}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|Any CPU = Release|Any CPU
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|Any CPU.Build.0 = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhone.Build.0 = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|Any CPU.Build.0 = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|iPhone.ActiveCfg = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|iPhone.Build.0 = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{B9B0D41C-1C07-4590-A919-5865E741B2EA}.Debug|iPhone.Build.0 = Debug|Any CPU
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|Any CPU.ActiveCfg = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|Any CPU.Build.0 = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhone.Build.0 = Debug|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|Any CPU.ActiveCfg = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|Any CPU.Build.0 = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|iPhone.ActiveCfg = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|iPhone.Build.0 = Release|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhone.ActiveCfg = Debug|iPhone
{62336DF0-60D8-478F-8140-B3CB089B417E}.Debug|iPhone.Build.0 = Debug|iPhone
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CDC6F6DC-E1C6-45A7-ACC2-A61CDCCA1436}
EndGlobalSection
EndGlobal

@ -58,7 +58,7 @@ namespace HelloworldXamarin.iOS
public override void WillEnterForeground(UIApplication application)
{
// Called as part of the transiton from background to active state.
// Called as part of the transition from background to active state.
// Here you can undo many of the changes made on entering the background.
}

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -9,6 +9,8 @@
<RootNamespace>HelloworldXamarin.iOS</RootNamespace>
<AssemblyName>HelloworldXamarin.iOS</AssemblyName>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
@ -77,7 +79,25 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.8.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.8.0\lib\netstandard2.0\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.2.23.0\lib\netstandard2.0\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.Api.2.23.0\lib\netstandard2.0\Grpc.Core.Api.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
@ -89,16 +109,14 @@
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\System.Interactive.Async.3.1.1\lib\netstandard1.3\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.6.0\lib\netstandard1.0\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.1.18.0\lib\netstandard1.5\Grpc.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
<ImageAsset Include="Assets.xcassets\Contents.json" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\Contents.json">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\" />
@ -108,6 +126,7 @@
<InterfaceDefinition Include="Main.storyboard" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<None Include="packages.config" />
@ -122,5 +141,11 @@
</ItemGroup>
<Import Project="..\HelloworldXamarin\HelloworldXamarin.projitems" Label="Shared" Condition="Exists('..\HelloworldXamarin\HelloworldXamarin.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.1.18.0\build\Xamarin.iOS10\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.18.0\build\Xamarin.iOS10\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.2.23.0\build\Xamarin.iOS10\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.2.23.0\build\Xamarin.iOS10\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.2.23.0\build\Xamarin.iOS10\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.2.23.0\build\Xamarin.iOS10\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.6.0" targetFramework="xamarinios10" />
<package id="Grpc.Core" version="1.18.0" targetFramework="xamarinios10" />
<package id="Google.Protobuf" version="3.8.0" targetFramework="xamarinios10" />
<package id="Grpc.Core" version="2.23.0" targetFramework="xamarinios10" />
<package id="Grpc.Core.Api" version="2.23.0" targetFramework="xamarinios10" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="xamarinios10" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="xamarinios10" />
<package id="System.AppContext" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Buffers" version="4.4.0" targetFramework="xamarinios10" />
<package id="System.Collections" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Console" version="4.3.0" targetFramework="xamarinios10" />
@ -22,6 +24,7 @@
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Linq" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Memory" version="4.5.3" targetFramework="xamarinios10" />
<package id="System.Net.Http" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="xamarinios10" />
@ -31,6 +34,7 @@
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="xamarinios10" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="xamarinios10" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="xamarinios10" />

@ -5,9 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
<PackageReference Include="Grpc" Version="1.17.0" />
<PackageReference Include="Grpc.Tools" Version="1.17.0" PrivateAssets="All" />
<PackageReference Include="Google.Protobuf" Version="3.8.0" />
<PackageReference Include="Grpc" Version="2.23.0" />
<PackageReference Include="Grpc.Tools" Version="2.23.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

@ -1,12 +1,18 @@
# gRPC in 3 minutes (Objective-C)
There are currently two ways to build projects with the gRPC Objective-C library:
* Cocoapods & Xcode
* Bazel (experimental)
## Cocoapods
## Installation
To run this example you should have [Cocoapods](https://cocoapods.org/#install) installed, as well
as the relevant tools to generate the client library code (and a server in another language, for
testing). You can obtain the latter by following [these setup instructions](https://github.com/grpc/homebrew-grpc).
## Hello Objective-C gRPC!
### Hello Objective-C gRPC!
Here's how to build and run the Objective-C implementation of the [Hello World](../../protos/helloworld.proto)
example used in [Getting started](https://github.com/grpc/grpc/tree/master/examples).
@ -27,7 +33,7 @@ Change your current directory to `examples/objective-c/helloworld`
$ cd examples/objective-c/helloworld
```
### Try it!
#### Try it!
To try the sample app, we need a gRPC server running locally. Let's compile and run, for example,
the C++ server in this repository:
@ -53,6 +59,49 @@ code in `main.m` and see the results in XCode's log console.
The code sends a `HLWHelloRequest` containing the string "Objective-C" to a local server. The server
responds with a `HLWHelloResponse`, which contains a string that is then output to the log.
## Bazel
### Installation
To run the examples in Bazel, you should have [Bazel](https://docs.bazel.build/versions/master/install-os-x.html) installed.
### Hello Objective-C gRPC!
Here's how to build and run the Objective-C implementation of the [Hello World](helloworld) example.
The code for the Hello World example and others live in the `examples` directory. Clone this repository to your local machine by running the following commands:
```shell
$ git clone --recursive https://github.com/grpc/grpc
```
Next, change your directory to `examples/objective-c`
```shell
$ cd grpc/examples/objective-c
```
Now build the Hello World project:
```shell
$ bazel build :HelloWorld
```
#### Try it!
To run the Hello World sample properly, we need a local server. Let's compile and run the corresponding C++ server:
```shell
$ bazel run //examples:greeter_server
```
To run the sample, you need to know the available simulator runtimes in your machine. You could either list the available runtimes yourself by running:
```shell
$ xcrun simctl list
```
Or just try running the app and it will let you know what is available in the error messages:
```shell
$ bazel run :HelloWorld
```
Note that running this command will build the project even if it is not built beforehand.
Finally, launch the app with one of the available runtimes:
```shell
$ bazel run :HelloWorld --ios_simulator_version='<runtime>' --ios_sumlator_device='<device>'
```
## Tutorial
You can find a more detailed tutorial in [gRPC Basics: Objective-C](https://grpc.io/docs/tutorials/basic/objective-c.html).

@ -4,7 +4,7 @@ gRPC in 3 minutes (PHP)
PREREQUISITES
-------------
This requires `php` >=5.5, `phpize`, `pecl`, `phpunit`
This requires `php` >=5.5, `phpize`, `pecl`
INSTALL
-------

@ -0,0 +1,86 @@
# gRPC PHP End-to-End Examples
This page shows a number of ways to create a PHP gRPC client and connect with
a gRPC backend service.
## Run the Server
For all the following examples, we use a simple gRPC server, written in Node.
```sh
$ git clone https://github.com/grpc/grpc-web
$ cd grpc-web
$ docker-compose build common node-server
$ docker run -d -p 9090:9090 --name node-server grpcweb/node-server
```
## Install the gRPC PECL extension
All the following commands are assumed to be run from this current directory.
```sh
$ cd grpc/examples/php/echo
```
In order to build a PHP gRPC client, we need to install the `grpc` extension
first.
```sh
$ docker build -t grpc-php/base -f ./base.Dockerfile .
```
## CLI
Let's first build a simple CLI gRPC client:
```sh
$ docker build -t grpc-php/echo-client -f ./cli.Dockerfile .
$ docker run -it --rm --link node-server:node-server grpc-php/echo-client
$ php client.php
```
## Apache
Now let's see how the gRPC PHP client can run with Apache:
```sh
$ docker build -t grpc-php/apache -f ./apache.Dockerfile .
$ docker run -it --rm --link node-server:node-server -p 80:80 grpc-php/apache
```
Open the browser to `http://localhost`.
## Nginx + FPM
We can also try running PHP-FPM and put Nginx in front of it.
The PHP-FPM part:
```sh
$ docker build -t grpc-php/fpm -f ./fpm.Dockerfile .
$ docker run -it --rm --link node-server:node-server -p 9000:9000 \
--name fpm grpc-php/fpm
```
The Nginx part:
```sh
$ docker run -it --rm -v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro \
--link fpm:fpm -p 80:80 nginx:1.17.4
```
Open the browser to `http://localhost`.

@ -0,0 +1,49 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base
FROM php:7.2-apache-stretch
RUN apt-get -qq update && apt-get -qq install -y git
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY --from=grpc-base /usr/local/bin/protoc /usr/local/bin/protoc
COPY --from=grpc-base /github/grpc/bins/opt/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so
RUN docker-php-ext-enable grpc
WORKDIR /var/www/html
COPY client.php ./index.php
COPY composer.json .
COPY echo.proto .
RUN protoc -I=. echo.proto --php_out=. --grpc_out=.
RUN composer install

@ -0,0 +1,38 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM php:7.2-stretch
RUN apt-get -qq update && apt-get -qq install -y \
autoconf automake curl git libtool \
pkg-config unzip zlib1g-dev
WORKDIR /tmp
RUN curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/\
protoc-3.8.0-linux-x86_64.zip -o /tmp/protoc.zip && \
unzip -qq protoc.zip && \
cp /tmp/bin/protoc /usr/local/bin/protoc
WORKDIR /github/grpc
RUN git clone https://github.com/grpc/grpc . && \
git submodule update --init && \
cd third_party/protobuf && git submodule update --init
RUN make grpc_php_plugin
RUN pecl install grpc

@ -0,0 +1,52 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base
FROM php:7.2-stretch
RUN apt-get -qq update && apt-get -qq install -y git
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY --from=grpc-base /usr/local/bin/protoc /usr/local/bin/protoc
COPY --from=grpc-base /github/grpc/bins/opt/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so
RUN docker-php-ext-enable grpc
WORKDIR /github/grpc-php/examples/echo
COPY client.php .
COPY composer.json .
COPY echo.proto .
RUN protoc -I=. echo.proto --php_out=. --grpc_out=.
RUN composer install
CMD ["/bin/bash"]

@ -0,0 +1,45 @@
<?php
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
require dirname(__FILE__).'/vendor/autoload.php';
$client = new Grpc\Gateway\Testing\EchoServiceClient('node-server:9090', [
'credentials' => Grpc\ChannelCredentials::createInsecure(),
]);
// unary call
$request = new Grpc\Gateway\Testing\EchoRequest();
$request->setMessage("Hello World!");
list($response, $status) = $client->Echo($request)->wait();
echo $response->getMessage()."\n";
// server streaming call
$stream_request = new Grpc\Gateway\Testing\ServerStreamingEchoRequest();
$stream_request->setMessage("stream message");
$stream_request->setMessageCount(5);
$responses = $client->ServerStreamingEcho($stream_request)->responses();
foreach ($responses as $response) {
echo $response->getMessage()."\n";
}

@ -0,0 +1,12 @@
{
"name": "grpc-php/echo-example",
"require": {
"grpc/grpc": "^v1.22.0",
"google/protobuf": "^3.7.0"
},
"autoload": {
"psr-4": {
"": "./"
}
}
}

@ -0,0 +1,100 @@
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package grpc.gateway.testing;
message Empty {}
message EchoRequest {
string message = 1;
}
message EchoResponse {
string message = 1;
int32 message_count = 2;
}
// Request type for server side streaming echo.
message ServerStreamingEchoRequest {
// Message string for server streaming request.
string message = 1;
// The total number of messages to be generated before the server
// closes the stream; default is 10.
int32 message_count = 2;
// The interval (ms) between two server messages. The server implementation
// may enforce some minimum interval (e.g. 100ms) to avoid message overflow.
int32 message_interval = 3;
}
// Response type for server streaming response.
message ServerStreamingEchoResponse {
// Response message.
string message = 1;
}
// Request type for client side streaming echo.
message ClientStreamingEchoRequest {
// A special value "" indicates that there's no further messages.
string message = 1;
}
// Response type for client side streaming echo.
message ClientStreamingEchoResponse {
// Total number of client messages that have been received.
int32 message_count = 1;
}
// A simple echo service.
service EchoService {
// One request followed by one response
// The server returns the client message as-is.
rpc Echo(EchoRequest) returns (EchoResponse);
// Sends back abort status.
rpc EchoAbort(EchoRequest) returns (EchoResponse) {}
// One empty request, ZERO processing, followed by one empty response
// (minimum effort to do message serialization).
rpc NoOp(Empty) returns (Empty);
// One request followed by a sequence of responses (streamed download).
// The server will return the same client message repeatedly.
rpc ServerStreamingEcho(ServerStreamingEchoRequest)
returns (stream ServerStreamingEchoResponse);
// One request followed by a sequence of responses (streamed download).
// The server abort directly.
rpc ServerStreamingEchoAbort(ServerStreamingEchoRequest)
returns (stream ServerStreamingEchoResponse) {}
// A sequence of requests followed by one response (streamed upload).
// The server returns the total number of messages as the result.
rpc ClientStreamingEcho(stream ClientStreamingEchoRequest)
returns (ClientStreamingEchoResponse);
// A sequence of requests with each message echoed by the server immediately.
// The server returns the same client messages in order.
// E.g. this is how the speech API works.
rpc FullDuplexEcho(stream EchoRequest) returns (stream EchoResponse);
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client messages and then returns the same
// client messages one by one after the client half-closes the stream.
// This is how an image recognition API may work.
rpc HalfDuplexEcho(stream EchoRequest) returns (stream EchoResponse);
}

@ -0,0 +1,49 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base
FROM php:7.2-fpm-stretch
RUN apt-get -qq update && apt-get -qq install -y git
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY --from=grpc-base /usr/local/bin/protoc /usr/local/bin/protoc
COPY --from=grpc-base /github/grpc/bins/opt/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so
RUN docker-php-ext-enable grpc
WORKDIR /var/www/html
COPY client.php ./index.php
COPY composer.json .
COPY echo.proto .
RUN protoc -I=. echo.proto --php_out=. --grpc_out=.
RUN composer install

@ -0,0 +1,23 @@
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass fpm:9000;
fastcgi_index index.php;
}
}

@ -39,6 +39,7 @@ py_binary(
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
python_version = "PY3",
)
py_binary(
@ -51,6 +52,7 @@ py_binary(
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
python_version = "PY3",
)
py_test(
@ -63,4 +65,5 @@ py_test(
":customized_auth_server",
":_credentials",
],
python_version = "PY3",
)

@ -45,6 +45,7 @@ py_binary(
"//external:six"
],
srcs_version = "PY2AND3",
python_version = "PY3",
)
py_library(
@ -68,6 +69,7 @@ py_binary(
"//:python3": [],
}),
srcs_version = "PY2AND3",
python_version = "PY3",
)
py_test(
@ -78,4 +80,5 @@ py_test(
":server"
],
size = "small",
python_version = "PY3",
)

@ -76,7 +76,7 @@ catch the `RpcError` raised by the for loop upon cancellation.
#### Cancellation on the Server Side
A server is reponsible for cancellation in two ways. It must respond in some way
A server is responsible for cancellation in two ways. It must respond in some way
when a client initiates a cancellation, otherwise long-running computations
could continue indefinitely.

@ -21,7 +21,7 @@ message HashNameRequest {
// The string that is desired in the secret's hash.
string desired_name = 1;
// The ideal Hamming distance betwen desired_name and the secret that will
// The ideal Hamming distance between desired_name and the secret that will
// be searched for.
int32 ideal_hamming_distance = 2;

@ -21,6 +21,7 @@ py_binary(
"//examples:helloworld_py_pb2_grpc",
],
srcs_version = "PY2AND3",
python_version = "PY3",
)
py_binary(
@ -32,6 +33,7 @@ py_binary(
"//examples:helloworld_py_pb2_grpc",
],
srcs_version = "PY2AND3",
python_version = "PY3",
)
py_test(
@ -43,4 +45,5 @@ py_test(
":server",
],
size = "small",
python_version = "PY3",
)

@ -0,0 +1,36 @@
## Data transmission demo for using gRPC in Python
在Python中使用gRPC时, 进行数据传输的四种方式 [官方指南](<https://grpc.io/docs/guides/concepts/#unary-rpc>)
- #### 一元模式
在一次调用中, 客户端只能向服务器传输一次请求数据, 服务器也只能返回一次响应
`client.py: simple_method`
`server.py: SimpleMethod`
- #### 客户端流模式
在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应
`client.py: client_streaming_method `
`server.py: ClientStreamingMethod`
- #### 服务端流模式
在一次调用中, 客户端只能向服务器传输一次请求数据, 但是服务器可以多次返回响应
`client.py: server_streaming_method`
`server.py: ServerStreamingMethod`
- #### 双向流模式
在一次调用中, 客户端和服务器都可以向对方多次收发数据
`client.py: bidirectional_streaming_method`
`server.py: BidirectionalStreamingMethod`

@ -0,0 +1,37 @@
## Data transmission demo for using gRPC in Python
Four ways of data transmission when gRPC is used in Python. [Official Guide](<https://grpc.io/docs/guides/concepts/#unary-rpc>)
- #### unary-unary
In a single call, the client can only send request once, and the server can only respond once.
`client.py: simple_method`
`server.py: SimpleMethod`
- #### stream-unary
In a single call, the client can transfer data to the server an arbitrary number of times, but the server can only return a response once.
`client.py: client_streaming_method`
`server.py: ClientStreamingMethod`
- #### unary-stream
In a single call, the client can only transmit data to the server at one time, but the server can return the response many times.
`client.py: server_streaming_method`
`server.py: ServerStreamingMethod`
- #### stream-stream
In a single call, both client and server can send and receive data
to each other multiple times.
`client.py: bidirectional_streaming_method`
`server.py: BidirectionalStreamingMethod`

@ -0,0 +1,114 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The example of four ways of data transmission using gRPC in Python."""
import time
import grpc
import demo_pb2_grpc
import demo_pb2
SERVER_ADDRESS = "localhost:23333"
CLIENT_ID = 1
# 一元模式(在一次调用中, 客户端只能向服务器传输一次请求数据, 服务器也只能返回一次响应)
# unary-unary(In a single call, the client can only send request once, and the server can
# only respond once.)
def simple_method(stub):
print("--------------Call SimpleMethod Begin--------------")
request = demo_pb2.Request(
client_id=CLIENT_ID, request_data="called by Python client")
response = stub.SimpleMethod(request)
print("resp from server(%d), the message=%s" % (response.server_id,
response.response_data))
print("--------------Call SimpleMethod Over---------------")
# 客户端流模式(在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应)
# stream-unary (In a single call, the client can transfer data to the server several times,
# but the server can only return a response once.)
def client_streaming_method(stub):
print("--------------Call ClientStreamingMethod Begin--------------")
# 创建一个生成器
# create a generator
def request_messages():
for i in range(5):
request = demo_pb2.Request(
client_id=CLIENT_ID,
request_data=("called by Python client, message:%d" % i))
yield request
response = stub.ClientStreamingMethod(request_messages())
print("resp from server(%d), the message=%s" % (response.server_id,
response.response_data))
print("--------------Call ClientStreamingMethod Over---------------")
# 服务端流模式(在一次调用中, 客户端只能一次向服务器传输数据, 但是服务器可以多次返回响应)
# unary-stream (In a single call, the client can only transmit data to the server at one time,
# but the server can return the response many times.)
def server_streaming_method(stub):
print("--------------Call ServerStreamingMethod Begin--------------")
request = demo_pb2.Request(
client_id=CLIENT_ID, request_data="called by Python client")
response_iterator = stub.ServerStreamingMethod(request)
for response in response_iterator:
print("recv from server(%d), message=%s" % (response.server_id,
response.response_data))
print("--------------Call ServerStreamingMethod Over---------------")
# 双向流模式 (在一次调用中, 客户端和服务器都可以向对方多次收发数据)
# stream-stream (In a single call, both client and server can send and receive data
# to each other multiple times.)
def bidirectional_streaming_method(stub):
print(
"--------------Call BidirectionalStreamingMethod Begin---------------")
# 创建一个生成器
# create a generator
def request_messages():
for i in range(5):
request = demo_pb2.Request(
client_id=CLIENT_ID,
request_data=("called by Python client, message: %d" % i))
yield request
time.sleep(1)
response_iterator = stub.BidirectionalStreamingMethod(request_messages())
for response in response_iterator:
print("recv from server(%d), message=%s" % (response.server_id,
response.response_data))
print("--------------Call BidirectionalStreamingMethod Over---------------")
def main():
with grpc.insecure_channel(SERVER_ADDRESS) as channel:
stub = demo_pb2_grpc.GRPCDemoStub(channel)
simple_method(stub)
client_streaming_method(stub)
server_streaming_method(stub)
bidirectional_streaming_method(stub)
if __name__ == '__main__':
main()

@ -0,0 +1,69 @@
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Syntax version declaration. Must be placed on the first line of non-commentary.
syntax = "proto3";
// The document of proto3: https://developers.google.com/protocol-buffers/docs/proto3
// , Python中使用时可以省略不写
// Package name definition, which can be omitted in Python.
package demo;
/*
`message`,
Python中定义一个类或者Golang中定义一个结构体
*/
/*
`message` is used to define the structure of the data to be transmitted, after the equal sign
is the field number. Each field in the message definition has a unique number.
The overall format is similar to defining a class in Python or a structure in Golang.
*/
message Request {
int64 client_id = 1;
string request_data = 2;
}
message Response {
int64 server_id = 1;
string response_data = 2;
}
// `service` gRPC服务定义方法的, , Golang中定义一个接口
// `service` is used to define methods for gRPC services in a fixed format, similar to defining
//an interface in Golang
service GRPCDemo {
// (, , )
// unary-unary(In a single call, the client can only send request once, and the server can
// only respond once.)
rpc SimpleMethod (Request) returns (Response);
// , ,
// stream-unary (In a single call, the client can transfer data to the server several times,
// but the server can only return a response once.)
rpc ClientStreamingMethod (stream Request) returns (Response);
// , ,
// unary-stream (In a single call, the client can only transmit data to the server at one time,
// but the server can return the response many times.)
rpc ServerStreamingMethod (Request) returns (stream Response);
// (, )
// stream-stream (In a single call, both client and server can send and receive data
// to each other multiple times.)
rpc BidirectionalStreamingMethod (stream Request) returns (stream Response);
}

@ -0,0 +1,174 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: demo.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='demo.proto',
package='demo',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\ndemo.proto\x12\x04\x64\x65mo\"2\n\x07Request\x12\x11\n\tclient_id\x18\x01 \x01(\x03\x12\x14\n\x0crequest_data\x18\x02 \x01(\t\"4\n\x08Response\x12\x11\n\tserver_id\x18\x01 \x01(\x03\x12\x15\n\rresponse_data\x18\x02 \x01(\t2\xf0\x01\n\x08GRPCDemo\x12-\n\x0cSimpleMethod\x12\r.demo.Request\x1a\x0e.demo.Response\x12\x38\n\x15\x43lientStreamingMethod\x12\r.demo.Request\x1a\x0e.demo.Response(\x01\x12\x38\n\x15ServerStreamingMethod\x12\r.demo.Request\x1a\x0e.demo.Response0\x01\x12\x41\n\x1c\x42idirectionalStreamingMethod\x12\r.demo.Request\x1a\x0e.demo.Response(\x01\x30\x01\x62\x06proto3')
)
_REQUEST = _descriptor.Descriptor(
name='Request',
full_name='demo.Request',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='client_id', full_name='demo.Request.client_id', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='request_data', full_name='demo.Request.request_data', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=20,
serialized_end=70,
)
_RESPONSE = _descriptor.Descriptor(
name='Response',
full_name='demo.Response',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='server_id', full_name='demo.Response.server_id', index=0,
number=1, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='response_data', full_name='demo.Response.response_data', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=72,
serialized_end=124,
)
DESCRIPTOR.message_types_by_name['Request'] = _REQUEST
DESCRIPTOR.message_types_by_name['Response'] = _RESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Request = _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {
'DESCRIPTOR' : _REQUEST,
'__module__' : 'demo_pb2'
# @@protoc_insertion_point(class_scope:demo.Request)
})
_sym_db.RegisterMessage(Request)
Response = _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {
'DESCRIPTOR' : _RESPONSE,
'__module__' : 'demo_pb2'
# @@protoc_insertion_point(class_scope:demo.Response)
})
_sym_db.RegisterMessage(Response)
_GRPCDEMO = _descriptor.ServiceDescriptor(
name='GRPCDemo',
full_name='demo.GRPCDemo',
file=DESCRIPTOR,
index=0,
serialized_options=None,
serialized_start=127,
serialized_end=367,
methods=[
_descriptor.MethodDescriptor(
name='SimpleMethod',
full_name='demo.GRPCDemo.SimpleMethod',
index=0,
containing_service=None,
input_type=_REQUEST,
output_type=_RESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='ClientStreamingMethod',
full_name='demo.GRPCDemo.ClientStreamingMethod',
index=1,
containing_service=None,
input_type=_REQUEST,
output_type=_RESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='ServerStreamingMethod',
full_name='demo.GRPCDemo.ServerStreamingMethod',
index=2,
containing_service=None,
input_type=_REQUEST,
output_type=_RESPONSE,
serialized_options=None,
),
_descriptor.MethodDescriptor(
name='BidirectionalStreamingMethod',
full_name='demo.GRPCDemo.BidirectionalStreamingMethod',
index=3,
containing_service=None,
input_type=_REQUEST,
output_type=_RESPONSE,
serialized_options=None,
),
])
_sym_db.RegisterServiceDescriptor(_GRPCDEMO)
DESCRIPTOR.services_by_name['GRPCDemo'] = _GRPCDEMO
# @@protoc_insertion_point(module_scope)

@ -0,0 +1,106 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import demo_pb2 as demo__pb2
class GRPCDemoStub(object):
"""service是用来给GRPC服务定义方法的, 格式固定, 类似于Golang中定义一个接口
`service` is used to define methods for GRPC services in a fixed format, similar to defining an interface in Golang
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.SimpleMethod = channel.unary_unary(
'/demo.GRPCDemo/SimpleMethod',
request_serializer=demo__pb2.Request.SerializeToString,
response_deserializer=demo__pb2.Response.FromString,
)
self.ClientStreamingMethod = channel.stream_unary(
'/demo.GRPCDemo/ClientStreamingMethod',
request_serializer=demo__pb2.Request.SerializeToString,
response_deserializer=demo__pb2.Response.FromString,
)
self.ServerStreamingMethod = channel.unary_stream(
'/demo.GRPCDemo/ServerStreamingMethod',
request_serializer=demo__pb2.Request.SerializeToString,
response_deserializer=demo__pb2.Response.FromString,
)
self.BidirectionalStreamingMethod = channel.stream_stream(
'/demo.GRPCDemo/BidirectionalStreamingMethod',
request_serializer=demo__pb2.Request.SerializeToString,
response_deserializer=demo__pb2.Response.FromString,
)
class GRPCDemoServicer(object):
"""service是用来给GRPC服务定义方法的, 格式固定, 类似于Golang中定义一个接口
`service` is used to define methods for GRPC services in a fixed format, similar to defining an interface in Golang
"""
def SimpleMethod(self, request, context):
"""简单模式
unary-unary
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ClientStreamingMethod(self, request_iterator, context):
"""客户端流模式(在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应)
stream-unary (In a single call, the client can transfer data to the server several times,
but the server can only return a response once.)
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ServerStreamingMethod(self, request, context):
"""服务端流模式(在一次调用中, 客户端只能一次向服务器传输数据, 但是服务器可以多次返回响应)
unary-stream (In a single call, the client can only transmit data to the server at one time,
but the server can return the response many times.)
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def BidirectionalStreamingMethod(self, request_iterator, context):
"""双向流模式 (在一次调用中, 客户端和服务器都可以向对方多次收发数据)
stream-stream (In a single call, both client and server can send and receive data
to each other multiple times.)
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_GRPCDemoServicer_to_server(servicer, server):
rpc_method_handlers = {
'SimpleMethod': grpc.unary_unary_rpc_method_handler(
servicer.SimpleMethod,
request_deserializer=demo__pb2.Request.FromString,
response_serializer=demo__pb2.Response.SerializeToString,
),
'ClientStreamingMethod': grpc.stream_unary_rpc_method_handler(
servicer.ClientStreamingMethod,
request_deserializer=demo__pb2.Request.FromString,
response_serializer=demo__pb2.Response.SerializeToString,
),
'ServerStreamingMethod': grpc.unary_stream_rpc_method_handler(
servicer.ServerStreamingMethod,
request_deserializer=demo__pb2.Request.FromString,
response_serializer=demo__pb2.Response.SerializeToString,
),
'BidirectionalStreamingMethod': grpc.stream_stream_rpc_method_handler(
servicer.BidirectionalStreamingMethod,
request_deserializer=demo__pb2.Request.FromString,
response_serializer=demo__pb2.Response.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'demo.GRPCDemo', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))

@ -0,0 +1,114 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The example of four ways of data transmission using gRPC in Python."""
from threading import Thread
from concurrent import futures
import grpc
import demo_pb2_grpc
import demo_pb2
SERVER_ADDRESS = 'localhost:23333'
SERVER_ID = 1
class DemoServer(demo_pb2_grpc.GRPCDemoServicer):
# 一元模式(在一次调用中, 客户端只能向服务器传输一次请求数据, 服务器也只能返回一次响应)
# unary-unary(In a single call, the client can only send request once, and the server can
# only respond once.)
def SimpleMethod(self, request, context):
print("SimpleMethod called by client(%d) the message: %s" %
(request.client_id, request.request_data))
response = demo_pb2.Response(
server_id=SERVER_ID,
response_data="Python server SimpleMethod Ok!!!!")
return response
# 客户端流模式(在一次调用中, 客户端可以多次向服务器传输数据, 但是服务器只能返回一次响应)
# stream-unary (In a single call, the client can transfer data to the server several times,
# but the server can only return a response once.)
def ClientStreamingMethod(self, request_iterator, context):
print("ClientStreamingMethod called by client...")
for request in request_iterator:
print("recv from client(%d), message= %s" % (request.client_id,
request.request_data))
response = demo_pb2.Response(
server_id=SERVER_ID,
response_data="Python server ClientStreamingMethod ok")
return response
# 服务端流模式(在一次调用中, 客户端只能一次向服务器传输数据, 但是服务器可以多次返回响应)
# unary-stream (In a single call, the client can only transmit data to the server at one time,
# but the server can return the response many times.)
def ServerStreamingMethod(self, request, context):
print("ServerStreamingMethod called by client(%d), message= %s" %
(request.client_id, request.request_data))
# 创建一个生成器
# create a generator
def response_messages():
for i in range(5):
response = demo_pb2.Response(
server_id=SERVER_ID,
response_data=("send by Python server, message=%d" % i))
yield response
return response_messages()
# 双向流模式 (在一次调用中, 客户端和服务器都可以向对方多次收发数据)
# stream-stream (In a single call, both client and server can send and receive data
# to each other multiple times.)
def BidirectionalStreamingMethod(self, request_iterator, context):
print("BidirectionalStreamingMethod called by client...")
# 开启一个子线程去接收数据
# Open a sub thread to receive data
def parse_request():
for request in request_iterator:
print("recv from client(%d), message= %s" %
(request.client_id, request.request_data))
t = Thread(target=parse_request)
t.start()
for i in range(5):
yield demo_pb2.Response(
server_id=SERVER_ID,
response_data=("send by Python server, message= %d" % i))
t.join()
def main():
server = grpc.server(futures.ThreadPoolExecutor())
demo_pb2_grpc.add_GRPCDemoServicer_to_server(DemoServer(), server)
server.add_insecure_port(SERVER_ADDRESS)
print("------------------start Python GRPC server")
server.start()
server.wait_for_termination()
# If raise Error:
# AttributeError: '_Server' object has no attribute 'wait_for_termination'
# You can use the following code instead:
# import time
# while 1:
# time.sleep(10)
if __name__ == '__main__':
main()

@ -35,6 +35,7 @@ py_binary(
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
python_version = "PY3",
)
py_binary(
@ -45,6 +46,7 @@ py_binary(
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
],
python_version = "PY3",
)
py_test(
@ -59,4 +61,5 @@ py_test(
":send_message",
":get_stats",
],
python_version = "PY3",
)

@ -21,13 +21,8 @@ import logging
import argparse
import grpc
# TODO(https://github.com/grpc/grpc/issues/19863): Remove.
try:
from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2
from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2_grpc
except ImportError:
from grpc_channelz.v1 import channelz_pb2
from grpc_channelz.v1 import channelz_pb2_grpc
from grpc_channelz.v1 import channelz_pb2
from grpc_channelz.v1 import channelz_pb2_grpc
def run(addr):

@ -55,4 +55,5 @@ py_test(
"../../../src/python/grpcio_status",
"../../../src/python/grpcio_tests",
],
python_version = "PY3",
)

@ -42,6 +42,7 @@ py_binary(
":prime_proto_pb2_grpc",
],
srcs_version = "PY3",
python_version = "PY3",
)
py_binary(
@ -57,6 +58,7 @@ py_binary(
"//:python3": [],
}),
srcs_version = "PY3",
python_version = "PY3",
)
py_test(
@ -67,4 +69,5 @@ py_test(
":server"
],
size = "small",
python_version = "PY3",
)

@ -30,4 +30,5 @@ py_test(
srcs = ["test/_wait_for_ready_example_test.py"],
deps = [":wait_for_ready_example",],
size = "small",
python_version = "PY3",
)

@ -23,7 +23,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
# version = '1.24.0-dev'
# version = '1.25.0-dev'
version = '0.0.9-dev'
s.version = version
s.summary = 'gRPC C++ library'
@ -31,7 +31,7 @@ Pod::Spec.new do |s|
s.license = 'Apache License, Version 2.0'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
grpc_version = '1.24.0-dev'
grpc_version = '1.25.0-dev'
s.source = {
:git => 'https://github.com/grpc/grpc.git',
@ -121,6 +121,7 @@ Pod::Spec.new do |s|
'include/grpcpp/security/credentials_impl.h',
'include/grpcpp/security/server_credentials.h',
'include/grpcpp/security/server_credentials_impl.h',
'include/grpcpp/security/tls_credentials_options.h',
'include/grpcpp/server.h',
'include/grpcpp/server_builder.h',
'include/grpcpp/server_builder_impl.h',
@ -186,6 +187,7 @@ Pod::Spec.new do |s|
'include/grpcpp/impl/codegen/interceptor_common.h',
'include/grpcpp/impl/codegen/message_allocator.h',
'include/grpcpp/impl/codegen/metadata_map.h',
'include/grpcpp/impl/codegen/method_handler.h',
'include/grpcpp/impl/codegen/method_handler_impl.h',
'include/grpcpp/impl/codegen/rpc_method.h',
'include/grpcpp/impl/codegen/rpc_service_method.h',
@ -219,6 +221,7 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpcpp/impl/codegen/core_codegen.h',
'src/cpp/client/secure_credentials.h',
'src/cpp/common/secure_auth_context.h',
'src/cpp/common/tls_credentials_options_util.h',
'src/cpp/server/secure_server_credentials.h',
'src/cpp/client/create_channel_internal.h',
'src/cpp/common/channel_filter.h',
@ -233,6 +236,8 @@ Pod::Spec.new do |s|
'src/cpp/common/secure_auth_context.cc',
'src/cpp/common/secure_channel_arguments.cc',
'src/cpp/common/secure_create_auth_context.cc',
'src/cpp/common/tls_credentials_options.cc',
'src/cpp/common/tls_credentials_options_util.cc',
'src/cpp/server/insecure_server_credentials.cc',
'src/cpp/server/secure_server_credentials.cc',
'src/cpp/client/channel_cc.cc',
@ -276,6 +281,7 @@ Pod::Spec.new do |s|
ss.private_header_files = 'include/grpcpp/impl/codegen/core_codegen.h',
'src/cpp/client/secure_credentials.h',
'src/cpp/common/secure_auth_context.h',
'src/cpp/common/tls_credentials_options_util.h',
'src/cpp/server/secure_server_credentials.h',
'src/cpp/client/create_channel_internal.h',
'src/cpp/common/channel_filter.h',
@ -287,7 +293,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
@ -299,7 +304,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gpr/useful.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/arena.h',
'src/core/lib/gprpp/atomic.h',
'src/core/lib/gprpp/fork.h',
@ -311,7 +315,8 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/pair.h',
'src/core/lib/gprpp/mpscq.h',
'src/core/lib/gprpp/set.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/profiling/timers.h',

@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.24.0-dev'
version = '1.25.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@ -32,6 +32,7 @@ Pod::Spec.new do |s|
s.source = {
:git => 'https://github.com/grpc/grpc.git',
:tag => "v#{version}",
:submodules => true,
}
# gRPC podspecs depend on fix for https://github.com/CocoaPods/CocoaPods/issues/6024,
@ -184,14 +185,12 @@ Pod::Spec.new do |s|
ss.header_mappings_dir = '.'
ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version
ss.dependency 'BoringSSL-GRPC', '0.0.3'
ss.dependency 'BoringSSL-GRPC', '0.0.4'
ss.compiler_flags = '-DGRPC_SHADOW_BORINGSSL_SYMBOLS'
# To save you from scrolling, this is the last part of the podspec.
ss.source_files = 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
@ -203,7 +202,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gpr/useful.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/arena.h',
'src/core/lib/gprpp/atomic.h',
'src/core/lib/gprpp/fork.h',
@ -215,7 +213,8 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/pair.h',
'src/core/lib/gprpp/mpscq.h',
'src/core/lib/gprpp/set.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/profiling/timers.h',
@ -233,7 +232,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/log_linux.cc',
'src/core/lib/gpr/log_posix.cc',
'src/core/lib/gpr/log_windows.cc',
'src/core/lib/gpr/mpscq.cc',
'src/core/lib/gpr/murmur_hash.cc',
'src/core/lib/gpr/string.cc',
'src/core/lib/gpr/string_posix.cc',
@ -255,6 +253,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/fork.cc',
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/thd_posix.cc',
'src/core/lib/gprpp/thd_windows.cc',
'src/core/lib/profiling/basic_timers.cc',
@ -310,6 +309,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/security_connector/security_connector.h',
'src/core/lib/security/security_connector/ssl/ssl_security_connector.h',
'src/core/lib/security/security_connector/ssl_utils.h',
'src/core/lib/security/security_connector/ssl_utils_config.h',
'src/core/lib/security/security_connector/tls/spiffe_security_connector.h',
'src/core/lib/security/transport/auth_filters.h',
'src/core/lib/security/transport/secure_endpoint.h',
@ -555,9 +555,11 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h',
'src/core/ext/filters/client_channel/xds/xds_api.h',
'src/core/ext/filters/client_channel/xds/xds_channel.h',
'src/core/ext/filters/client_channel/xds/xds_channel_args.h',
'src/core/ext/filters/client_channel/xds/xds_client.h',
'src/core/ext/filters/client_channel/xds/xds_client_stats.h',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
@ -802,6 +804,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/security_connector/security_connector.cc',
'src/core/lib/security/security_connector/ssl/ssl_security_connector.cc',
'src/core/lib/security/security_connector/ssl_utils.cc',
'src/core/lib/security/security_connector/ssl_utils_config.cc',
'src/core/lib/security/security_connector/tls/spiffe_security_connector.cc',
'src/core/lib/security/transport/client_auth_filter.cc',
'src/core/lib/security/transport/secure_endpoint.cc',
@ -914,9 +917,10 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/xds/xds_api.cc',
'src/core/ext/filters/client_channel/xds/xds_channel_secure.cc',
'src/core/ext/filters/client_channel/xds/xds_client.cc',
'src/core/ext/filters/client_channel/xds/xds_client_stats.cc',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
@ -965,7 +969,6 @@ Pod::Spec.new do |s|
ss.private_header_files = 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
@ -977,7 +980,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/tls_pthread.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gpr/useful.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/arena.h',
'src/core/lib/gprpp/atomic.h',
'src/core/lib/gprpp/fork.h',
@ -989,7 +991,8 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/map.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/gprpp/pair.h',
'src/core/lib/gprpp/mpscq.h',
'src/core/lib/gprpp/set.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/profiling/timers.h',
@ -1044,6 +1047,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/security_connector/security_connector.h',
'src/core/lib/security/security_connector/ssl/ssl_security_connector.h',
'src/core/lib/security/security_connector/ssl_utils.h',
'src/core/lib/security/security_connector/ssl_utils_config.h',
'src/core/lib/security/security_connector/tls/spiffe_security_connector.h',
'src/core/lib/security/transport/auth_filters.h',
'src/core/lib/security/transport/secure_endpoint.h',
@ -1289,9 +1293,11 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h',
'src/core/ext/filters/client_channel/xds/xds_api.h',
'src/core/ext/filters/client_channel/xds/xds_channel.h',
'src/core/ext/filters/client_channel/xds/xds_channel_args.h',
'src/core/ext/filters/client_channel/xds/xds_client.h',
'src/core/ext/filters/client_channel/xds/xds_client_stats.h',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.24.0-dev'
version = '1.25.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'
@ -42,22 +42,40 @@ Pod::Spec.new do |s|
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/ProtoRPC'
s.default_subspec = 'Main', 'Legacy', 'Legacy-Header'
s.default_subspec = 'Main'
s.subspec 'Legacy-Header' do |ss|
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.public_header_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.h"
end
s.subspec 'Main' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.dependency 'gRPC', version
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/Interface', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "src/objective-c/ProtoRPC/ProtoMethod.{h,m}",
"src/objective-c/ProtoRPC/ProtoRPC.{h,m}",
"src/objective-c/ProtoRPC/ProtoService.{h,m}"
end
s.subspec 'Legacy' do |ss|
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
ss.dependency "#{s.name}/Main", version
ss.dependency "#{s.name}/Legacy-Header", version
ss.dependency 'gRPC/GRPCCore', version
ss.dependency 'gRPC-RxLibrary', version
ss.dependency 'Protobuf', '~> 3.0'
ss.source_files = "#{src_dir}/*.{h,m}"
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
"src/objective-c/ProtoRPC/ProtoServiceLegacy.m"
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.
s.subspec 'CFStream' do |ss|
ss.dependency "#{s.name}/Main", version
ss.dependency "#{s.name}/Legacy", version
end
s.pod_target_xcconfig = {

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.24.0-dev'
version = '1.25.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'
@ -42,6 +42,23 @@ Pod::Spec.new do |s|
s.module_name = name
s.header_dir = name
s.default_subspec = 'Interface', 'Implementation'
src_dir = 'src/objective-c/RxLibrary'
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.source_files = "#{src_dir}/*.h"
ss.public_header_files = "#{src_dir}/*.h"
end
s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = "#{src_dir}"
ss.source_files = "#{src_dir}/*.m", "#{src_dir}/**/*.{h,m}"
ss.private_header_files = "#{src_dir}/**/*.h"
ss.dependency "#{s.name}/Interface"
end
src_dir = 'src/objective-c/RxLibrary'
s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
s.private_header_files = "#{src_dir}/private/*.h"

@ -20,7 +20,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.24.0-dev'
version = '1.25.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'
@ -32,22 +32,11 @@ Pod::Spec.new do |s|
:tag => "v#{version}",
}
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
name = 'GRPCClient'
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/GRPCClient'
s.dependency 'gRPC-RxLibrary', version
s.default_subspec = 'Main'
# Certificates, to be able to establish TLS connections:
s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
s.pod_target_xcconfig = {
# This is needed by all pods that depend on gRPC-RxLibrary:
@ -55,29 +44,140 @@ Pod::Spec.new do |s|
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
}
s.subspec 'Main' do |ss|
ss.header_mappings_dir = "#{src_dir}"
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
"src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
"src/objective-c/GRPCClient/GRPCCall+Cronet.h",
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
ss.dependency "gRPC-RxLibrary/Interface", version
ss.ios.deployment_target = '7.0'
ss.osx.deployment_target = '10.9'
ss.tvos.deployment_target = '10.0'
ss.watchos.deployment_target = '4.0'
end
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall.h',
'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
'src/objective-c/GRPCClient/GRPCCallOptions.h',
'src/objective-c/GRPCClient/GRPCInterceptor.h',
'src/objective-c/GRPCClient/GRPCTransport.h',
'src/objective-c/GRPCClient/GRPCDispatchable.h',
'src/objective-c/GRPCClient/version.h'
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
'src/objective-c/GRPCClient/GRPCCall.m',
'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
'src/objective-c/GRPCClient/GRPCCall+Interceptor.m',
'src/objective-c/GRPCClient/GRPCCallOptions.h',
'src/objective-c/GRPCClient/GRPCCallOptions.m',
'src/objective-c/GRPCClient/GRPCDispatchable.h',
'src/objective-c/GRPCClient/GRPCInterceptor.h',
'src/objective-c/GRPCClient/GRPCInterceptor.m',
'src/objective-c/GRPCClient/GRPCTransport.h',
'src/objective-c/GRPCClient/GRPCTransport.m',
'src/objective-c/GRPCClient/internal/*.h',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
'src/objective-c/GRPCClient/private/GRPCTransport+Private.m',
'src/objective-c/GRPCClient/version.h'
ss.dependency "#{s.name}/Interface-Legacy", version
ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
ss.exclude_files = "#{src_dir}/GRPCCall+GID.{h,m}"
ss.private_header_files = "#{src_dir}/private/*.h", "#{src_dir}/internal/*.h"
ss.ios.deployment_target = '7.0'
ss.osx.deployment_target = '10.9'
ss.tvos.deployment_target = '10.0'
ss.watchos.deployment_target = '4.0'
end
s.subspec 'GRPCCore' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h'
ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}',
'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h',
'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m',
'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m',
'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
'src/objective-c/GRPCClient/GRPCCall+OAuth2.m',
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
'src/objective-c/GRPCClient/GRPCCall+Tests.m',
'src/objective-c/GRPCClient/GRPCCallLegacy.m'
# Certificates, to be able to establish TLS connections:
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency "#{s.name}/Interface-Legacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version
ss.ios.deployment_target = '7.0'
ss.osx.deployment_target = '10.9'
ss.tvos.deployment_target = '10.0'
ss.watchos.deployment_target = '4.0'
end
s.subspec 'GRPCCoreCronet' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,m}'
ss.dependency "#{s.name}/GRPCCore", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework'
ss.ios.deployment_target = '8.0'
end
# CFStream is now default. Leaving this subspec only for compatibility purpose.
s.subspec 'CFStream' do |ss|
ss.dependency "#{s.name}/Main", version
end
ss.dependency "#{s.name}/GRPCCore", version
s.subspec 'GID' do |ss|
ss.ios.deployment_target = '7.0'
ss.osx.deployment_target = '10.9'
ss.tvos.deployment_target = '10.0'
ss.watchos.deployment_target = '4.0'
end
ss.header_mappings_dir = "#{src_dir}"
ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}"
s.subspec 'InternalTesting' do |ss|
ss.dependency "#{s.name}/GRPCCore", version
ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h'
ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}'
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.dependency "#{s.name}/Main", version
ss.dependency 'Google/SignIn'
ss.ios.deployment_target = '7.0'
ss.osx.deployment_target = '10.9'
ss.tvos.deployment_target = '10.0'
ss.watchos.deployment_target = '4.0'
end
end

@ -85,7 +85,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/alloc.h )
s.files += %w( src/core/lib/gpr/arena.h )
s.files += %w( src/core/lib/gpr/env.h )
s.files += %w( src/core/lib/gpr/mpscq.h )
s.files += %w( src/core/lib/gpr/murmur_hash.h )
s.files += %w( src/core/lib/gpr/spinlock.h )
s.files += %w( src/core/lib/gpr/string.h )
@ -97,7 +96,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/tls_pthread.h )
s.files += %w( src/core/lib/gpr/tmpfile.h )
s.files += %w( src/core/lib/gpr/useful.h )
s.files += %w( src/core/lib/gprpp/abstract.h )
s.files += %w( src/core/lib/gprpp/arena.h )
s.files += %w( src/core/lib/gprpp/atomic.h )
s.files += %w( src/core/lib/gprpp/fork.h )
@ -109,7 +107,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/manual_constructor.h )
s.files += %w( src/core/lib/gprpp/map.h )
s.files += %w( src/core/lib/gprpp/memory.h )
s.files += %w( src/core/lib/gprpp/pair.h )
s.files += %w( src/core/lib/gprpp/mpscq.h )
s.files += %w( src/core/lib/gprpp/set.h )
s.files += %w( src/core/lib/gprpp/sync.h )
s.files += %w( src/core/lib/gprpp/thd.h )
s.files += %w( src/core/lib/profiling/timers.h )
@ -127,7 +126,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/log_linux.cc )
s.files += %w( src/core/lib/gpr/log_posix.cc )
s.files += %w( src/core/lib/gpr/log_windows.cc )
s.files += %w( src/core/lib/gpr/mpscq.cc )
s.files += %w( src/core/lib/gpr/murmur_hash.cc )
s.files += %w( src/core/lib/gpr/string.cc )
s.files += %w( src/core/lib/gpr/string_posix.cc )
@ -149,6 +147,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/fork.cc )
s.files += %w( src/core/lib/gprpp/global_config_env.cc )
s.files += %w( src/core/lib/gprpp/host_port.cc )
s.files += %w( src/core/lib/gprpp/mpscq.cc )
s.files += %w( src/core/lib/gprpp/thd_posix.cc )
s.files += %w( src/core/lib/gprpp/thd_windows.cc )
s.files += %w( src/core/lib/profiling/basic_timers.cc )
@ -240,6 +239,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/security_connector/security_connector.h )
s.files += %w( src/core/lib/security/security_connector/ssl/ssl_security_connector.h )
s.files += %w( src/core/lib/security/security_connector/ssl_utils.h )
s.files += %w( src/core/lib/security/security_connector/ssl_utils_config.h )
s.files += %w( src/core/lib/security/security_connector/tls/spiffe_security_connector.h )
s.files += %w( src/core/lib/security/transport/auth_filters.h )
s.files += %w( src/core/lib/security/transport/secure_endpoint.h )
@ -485,9 +485,11 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h )
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h )
s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_api.h )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_channel.h )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_channel_args.h )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_client.h )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_client_stats.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h )
@ -732,6 +734,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/security_connector/security_connector.cc )
s.files += %w( src/core/lib/security/security_connector/ssl/ssl_security_connector.cc )
s.files += %w( src/core/lib/security/security_connector/ssl_utils.cc )
s.files += %w( src/core/lib/security/security_connector/ssl_utils_config.cc )
s.files += %w( src/core/lib/security/security_connector/tls/spiffe_security_connector.cc )
s.files += %w( src/core/lib/security/transport/client_auth_filter.cc )
s.files += %w( src/core/lib/security/transport/secure_endpoint.cc )
@ -844,9 +847,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c )
s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_api.cc )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_channel_secure.cc )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_client.cc )
s.files += %w( src/core/ext/filters/client_channel/xds/xds_client_stats.cc )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c )

@ -54,18 +54,6 @@
'-g',
'-Wall',
'-Wextra',
'-Werror',
'$(W_NO_UNKNOWN_WARNING_OPTION)',
'-Wno-long-long',
'-Wno-unused-parameter',
'-Wno-deprecated-declarations',
'-Wno-sign-conversion',
'-Wno-shadow',
'-Wno-conversion',
'-Wno-implicit-fallthrough',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-Wno-maybe-uninitialized',
'-DOSATOMIC_USE_INLINED=1',
'-Ithird_party/upb',
'-Isrc/core/ext/upb-generated',
@ -142,18 +130,6 @@
'-g',
'-Wall',
'-Wextra',
'-Werror',
'$(W_NO_UNKNOWN_WARNING_OPTION)',
'-Wno-long-long',
'-Wno-unused-parameter',
'-Wno-deprecated-declarations',
'-Wno-sign-conversion',
'-Wno-shadow',
'-Wno-conversion',
'-Wno-implicit-fallthrough',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-Wno-maybe-uninitialized',
'-DOSATOMIC_USE_INLINED=1',
'-Ithird_party/upb',
'-Isrc/core/ext/upb-generated',
@ -162,18 +138,6 @@
'-g',
'-Wall',
'-Wextra',
'-Werror',
'$(W_NO_UNKNOWN_WARNING_OPTION)',
'-Wno-long-long',
'-Wno-unused-parameter',
'-Wno-deprecated-declarations',
'-Wno-sign-conversion',
'-Wno-shadow',
'-Wno-conversion',
'-Wno-implicit-fallthrough',
'-Wno-sign-compare',
'-Wno-missing-field-initializers',
'-Wno-maybe-uninitialized',
'-DOSATOMIC_USE_INLINED=1',
'-Ithird_party/upb',
'-Isrc/core/ext/upb-generated',
@ -208,32 +172,6 @@
'test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.cc',
],
},
{
'target_name': 'cxxabi',
'type': 'static_library',
'dependencies': [
],
'sources': [
'third_party/libcxxabi/src/abort_message.cpp',
'third_party/libcxxabi/src/cxa_aux_runtime.cpp',
'third_party/libcxxabi/src/cxa_default_handlers.cpp',
'third_party/libcxxabi/src/cxa_demangle.cpp',
'third_party/libcxxabi/src/cxa_exception_storage.cpp',
'third_party/libcxxabi/src/cxa_guard.cpp',
'third_party/libcxxabi/src/cxa_handlers.cpp',
'third_party/libcxxabi/src/cxa_noexception.cpp',
'third_party/libcxxabi/src/cxa_thread_atexit.cpp',
'third_party/libcxxabi/src/cxa_unexpected.cpp',
'third_party/libcxxabi/src/cxa_vector.cpp',
'third_party/libcxxabi/src/cxa_virtual.cpp',
'third_party/libcxxabi/src/fallback_malloc.cpp',
'third_party/libcxxabi/src/private_typeinfo.cpp',
'third_party/libcxxabi/src/stdlib_exception.cpp',
'third_party/libcxxabi/src/stdlib_new_delete.cpp',
'third_party/libcxxabi/src/stdlib_stdexcept.cpp',
'third_party/libcxxabi/src/stdlib_typeinfo.cpp',
],
},
{
'target_name': 'gpr',
'type': 'static_library',
@ -254,7 +192,6 @@
'src/core/lib/gpr/log_linux.cc',
'src/core/lib/gpr/log_posix.cc',
'src/core/lib/gpr/log_windows.cc',
'src/core/lib/gpr/mpscq.cc',
'src/core/lib/gpr/murmur_hash.cc',
'src/core/lib/gpr/string.cc',
'src/core/lib/gpr/string_posix.cc',
@ -276,6 +213,7 @@
'src/core/lib/gprpp/fork.cc',
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/thd_posix.cc',
'src/core/lib/gprpp/thd_windows.cc',
'src/core/lib/profiling/basic_timers.cc',
@ -504,6 +442,7 @@
'src/core/lib/security/security_connector/security_connector.cc',
'src/core/lib/security/security_connector/ssl/ssl_security_connector.cc',
'src/core/lib/security/security_connector/ssl_utils.cc',
'src/core/lib/security/security_connector/ssl_utils_config.cc',
'src/core/lib/security/security_connector/tls/spiffe_security_connector.cc',
'src/core/lib/security/transport/client_auth_filter.cc',
'src/core/lib/security/transport/secure_endpoint.cc',
@ -616,9 +555,10 @@
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/xds/xds_api.cc',
'src/core/ext/filters/client_channel/xds/xds_channel_secure.cc',
'src/core/ext/filters/client_channel/xds/xds_client.cc',
'src/core/ext/filters/client_channel/xds/xds_client_stats.cc',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
@ -1482,9 +1422,10 @@
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/xds/xds_api.cc',
'src/core/ext/filters/client_channel/xds/xds_channel.cc',
'src/core/ext/filters/client_channel/xds/xds_client.cc',
'src/core/ext/filters/client_channel/xds/xds_client_stats.cc',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
@ -1583,6 +1524,8 @@
'src/cpp/common/secure_auth_context.cc',
'src/cpp/common/secure_channel_arguments.cc',
'src/cpp/common/secure_create_auth_context.cc',
'src/cpp/common/tls_credentials_options.cc',
'src/cpp/common/tls_credentials_options_util.cc',
'src/cpp/server/insecure_server_credentials.cc',
'src/cpp/server/secure_server_credentials.cc',
'src/cpp/client/channel_cc.cc',
@ -2270,8 +2213,11 @@
],
'sources': [
'third_party/benchmark/src/benchmark.cc',
'third_party/benchmark/src/benchmark_api_internal.cc',
'third_party/benchmark/src/benchmark_main.cc',
'third_party/benchmark/src/benchmark_name.cc',
'third_party/benchmark/src/benchmark_register.cc',
'third_party/benchmark/src/benchmark_runner.cc',
'third_party/benchmark/src/colorprint.cc',
'third_party/benchmark/src/commandlineflags.cc',
'third_party/benchmark/src/complexity.cc',

@ -805,20 +805,32 @@ typedef struct grpc_tls_credential_reload_arg grpc_tls_credential_reload_arg;
typedef void (*grpc_tls_on_credential_reload_done_cb)(
grpc_tls_credential_reload_arg* arg);
/** A struct containing all information necessary to schedule/cancel
a credential reload request. cb and cb_user_data represent a gRPC-provided
callback and an argument passed to it. key_materials is an in/output
parameter containing currently used/newly reloaded credentials. If
credential reload does not result in a new credential, key_materials should
not be modified. status and error_details are used to hold information about
errors occurred when a credential reload request is scheduled/cancelled. It
is used for experimental purpose for now and subject to change. */
/** A struct containing all information necessary to schedule/cancel a
credential reload request.
- cb and cb_user_data represent a gRPC-provided
callback and an argument passed to it.
- key_materials_config is an in/output parameter containing currently
used/newly reloaded credentials. If credential reload does not result
in a new credential, key_materials_config should not be modified.
- status and error_details are used to hold information about
errors occurred when a credential reload request is scheduled/cancelled.
- config is a pointer to the unique grpc_tls_credential_reload_config
instance that this argument corresponds to.
- context is a pointer to a wrapped language implementation of this
grpc_tls_credential_reload_arg instance.
- destroy_context is a pointer to a caller-provided method that cleans
up any data associated with the context pointer.
It is used for experimental purposes for now and subject to change.
*/
struct grpc_tls_credential_reload_arg {
grpc_tls_on_credential_reload_done_cb cb;
void* cb_user_data;
grpc_tls_key_materials_config* key_materials_config;
grpc_ssl_certificate_config_reload_status status;
const char* error_details;
grpc_tls_credential_reload_config* config;
void* context;
void (*destroy_context)(void* ctx);
};
/** Create a grpc_tls_credential_reload_config instance.
@ -863,16 +875,27 @@ typedef void (*grpc_tls_on_server_authorization_check_done_cb)(
grpc_tls_server_authorization_check_arg* arg);
/** A struct containing all information necessary to schedule/cancel a server
authorization check request. cb and cb_user_data represent a gRPC-provided
callback and an argument passed to it. success will store the result of
server authorization check. That is, if success returns a non-zero value, it
means the authorization check passes and if returning zero, it means the
check fails. target_name is the name of an endpoint the channel is connecting
to and certificate represents a complete certificate chain including both
signing and leaf certificates. status and error_details contain information
about errors occurred when a server authorization check request is
scheduled/cancelled. It is used for experimental purpose for now and subject
to change.*/
authorization check request.
- cb and cb_user_data represent a gRPC-provided callback and an argument
passed to it.
- success will store the result of server authorization check. That is,
if success returns a non-zero value, it means the authorization check
passes and if returning zero, it means the check fails.
- target_name is the name of an endpoint the channel is connecting to.
- peer_cert represents a complete certificate chain including both
signing and leaf certificates.
- status and error_details contain information
about errors occurred when a server authorization check request is
scheduled/cancelled.
- config is a pointer to the unique
grpc_tls_server_authorization_check_config instance that this argument
corresponds to.
- context is a pointer to a wrapped language implementation of this
grpc_tls_server_authorization_check_arg instance.
- destroy_context is a pointer to a caller-provided method that cleans
up any data associated with the context pointer.
It is used for experimental purpose for now and subject to change.
*/
struct grpc_tls_server_authorization_check_arg {
grpc_tls_on_server_authorization_check_done_cb cb;
void* cb_user_data;
@ -881,6 +904,9 @@ struct grpc_tls_server_authorization_check_arg {
const char* peer_cert;
grpc_status_code status;
const char* error_details;
grpc_tls_server_authorization_check_config* config;
void* context;
void (*destroy_context)(void* ctx);
};
/** Create a grpc_tls_server_authorization_check_config instance.

@ -267,6 +267,14 @@ typedef struct {
grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
an appropriate pointer arg vtable) */
#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
/** If non-zero, it will determine the maximum frame size used by TSI's frame
* protector.
*
* NOTE: Be aware that using a large "max_frame_size" is memory inefficient
* for non-zerocopy protectors. Also, increasing this value above 1MiB
* can break old binaries that don't support larger than 1MiB frame
* size. */
#define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
/** Maximum metadata size, in bytes. Note this limit applies to the max sum of
all metadata key-value entries in a batch of headers. */
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
@ -331,6 +339,13 @@ typedef struct {
value is 15 minutes. */
#define GRPC_ARG_LOCALITY_RETENTION_INTERVAL_MS \
"grpc.xds_locality_retention_interval_ms"
/* Timeout in milliseconds to wait for the localities of a specific priority to
complete their initial connection attempt before xDS fails over to the next
priority. Specifically, the connection attempt of a priority is considered
completed when any locality of that priority is ready or all the localities
of that priority fail to connect. If 0, failover happens immediately. Default
value is 10 seconds. */
#define GRPC_ARG_XDS_FAILOVER_TIMEOUT_MS "grpc.xds_failover_timeout_ms"
/** If non-zero, grpc server's cronet compression workaround will be enabled */
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
"grpc.workaround.cronet_compression"

@ -27,15 +27,6 @@
* - some syscalls to be made directly
*/
/*
* Defines GRPC_USE_CPP_STD_LIB to use standard C++ library instead of
* in-house library if possible. (e.g. std::map)
*/
#ifndef GRPC_USE_CPP_STD_LIB
/* Default value will be 1 once all tests become green. */
#define GRPC_USE_CPP_STD_LIB 0
#endif
/* Get windows.h included everywhere (we need it) */
#if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32)
#ifndef WIN32_LEAN_AND_MEAN
@ -195,6 +186,26 @@
#else /* musl libc */
#define GPR_MUSL_LIBC_COMPAT 1
#endif
#elif defined(__ASYLO__)
#define GPR_ARCH_64 1
#define GPR_CPU_POSIX 1
#define GPR_GCC_TLS 1
#define GPR_PLATFORM_STRING "asylo"
#define GPR_GCC_SYNC 1
#define GPR_POSIX_SYNC 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_LOG 1
#define GPR_POSIX_TIME 1
#define GPR_POSIX_ENV 1
#define GPR_ASYLO 1
#define GRPC_POSIX_SOCKET 1
#define GRPC_POSIX_SOCKETADDR
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_TIMER_USE_GENERIC 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_WAKEUP_FD 1
#define GRPC_ARES 0
#define GPR_NO_AUTODETECT_PLATFORM 1
#elif defined(__APPLE__)
#include <Availability.h>
#include <TargetConditionals.h>
@ -206,7 +217,7 @@
#define GPR_CPU_IPHONE 1
#define GPR_PTHREAD_TLS 1
#define GRPC_CFSTREAM 1
/* the c-ares resolver isnt safe to enable on iOS */
/* the c-ares resolver isn't safe to enable on iOS */
#define GRPC_ARES 0
#else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx"
@ -656,10 +667,14 @@ typedef unsigned __int64 uint64_t;
/* GRPC_ALLOW_EXCEPTIONS should be 0 or 1 if exceptions are allowed or not */
#ifndef GRPC_ALLOW_EXCEPTIONS
/* If not already set, set to 1 on Windows (style guide standard) but to
* 0 on non-Windows platforms unless the compiler defines __EXCEPTIONS */
#ifdef GPR_WINDOWS
#if defined(_MSC_VER) && defined(_CPPUNWIND)
#define GRPC_ALLOW_EXCEPTIONS 1
#elif defined(__EXCEPTIONS)
#define GRPC_ALLOW_EXCEPTIONS 1
#else
#define GRPC_ALLOW_EXCEPTIONS 0
#endif
#else /* GPR_WINDOWS */
#ifdef __EXCEPTIONS
#define GRPC_ALLOW_EXCEPTIONS 1

@ -18,7 +18,7 @@
#ifndef GRPC_IMPL_CODEGEN_SYNC_GENERIC_H
#define GRPC_IMPL_CODEGEN_SYNC_GENERIC_H
/* Generic type defintions for gpr_sync. */
/* Generic type definitions for gpr_sync. */
#include <grpc/impl/codegen/port_platform.h>

@ -100,7 +100,7 @@ class ServerGenericBidiReactor
/// Similar to ServerBidiReactor::OnStarted except for argument type.
///
/// \param[in] context The context object associated with this RPC.
virtual void OnStarted(GenericServerContext* context) {}
virtual void OnStarted(GenericServerContext* /*context*/) {}
private:
void OnStarted(::grpc_impl::ServerContext* ctx) final {

@ -50,7 +50,7 @@ class ClientAsyncStreamingInterface {
/// when the call has been ended.
/// Should not be used concurrently with other operations.
///
/// It is appropriate to call this method when both:
/// It is appropriate to call this method exactly once when both:
/// * the client side has no more message to send
/// (this can be declared implicitly by calling this method, or
/// explicitly through an earlier call to the <i>WritesDone</i> method
@ -197,7 +197,7 @@ template <class R>
class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncReader));
}
@ -346,7 +346,7 @@ template <class W>
class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncWriter));
}
@ -514,7 +514,7 @@ class ClientAsyncReaderWriter final
: public ClientAsyncReaderWriterInterface<W, R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncReaderWriter));
}

@ -96,7 +96,7 @@ class ClientAsyncResponseReader final
: public ClientAsyncResponseReaderInterface<R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncResponseReader));
}
@ -178,7 +178,7 @@ class ClientAsyncResponseReader final
// disable operator new
static void* operator new(std::size_t size);
static void* operator new(std::size_t size, void* p) { return p; }
static void* operator new(std::size_t /*size*/, void* p) { return p; }
::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
::grpc::internal::CallOpSendMessage,
@ -303,12 +303,12 @@ namespace std {
template <class R>
class default_delete<::grpc_impl::ClientAsyncResponseReader<R>> {
public:
void operator()(void* p) {}
void operator()(void* /*p*/) {}
};
template <class R>
class default_delete<::grpc_impl::ClientAsyncResponseReaderInterface<R>> {
public:
void operator()(void* p) {}
void operator()(void* /*p*/) {}
};
} // namespace std

@ -36,6 +36,12 @@ template <class RequestType, class ResponseType>
class CallbackUnaryHandler;
template <class RequestType, class ResponseType>
class CallbackServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
template <::grpc::StatusCode code>
class ErrorMethodHandler;
} // namespace internal
} // namespace grpc_impl
@ -51,21 +57,10 @@ class CallOpSendMessage;
template <class R>
class CallOpRecvMessage;
class CallOpGenericRecvMessage;
class MethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
template <StatusCode code>
class ErrorMethodHandler;
class ExternalConnectionAcceptorImpl;
template <class R>
class DeserializeFuncType;
class GrpcByteBufferPeer;
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
} // namespace internal
/// A sequence of bytes.
@ -175,19 +170,15 @@ class ByteBuffer final {
friend class internal::CallOpRecvMessage;
friend class internal::CallOpGenericRecvMessage;
template <class ServiceType, class RequestType, class ResponseType>
friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class internal::RpcMethodHandler;
friend class ::grpc_impl::internal::RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class internal::ServerStreamingHandler;
friend class ::grpc_impl::internal::ServerStreamingHandler;
template <class RequestType, class ResponseType>
friend class ::grpc_impl::internal::CallbackUnaryHandler;
template <class RequestType, class ResponseType>
friend class ::grpc_impl::internal::CallbackServerStreamingHandler;
template <StatusCode code>
friend class internal::ErrorMethodHandler;
friend class ::grpc_impl::internal::ErrorMethodHandler;
template <class R>
friend class internal::DeserializeFuncType;
friend class ProtoBufferReader;

@ -88,6 +88,9 @@ class WriteOptions {
WriteOptions(const WriteOptions& other)
: flags_(other.flags_), last_message_(other.last_message_) {}
/// Default assignment operator
WriteOptions& operator=(const WriteOptions& other) = default;
/// Clear all flags.
inline void Clear() { flags_ = 0; }
@ -206,13 +209,14 @@ namespace internal {
template <int I>
class CallNoOp {
protected:
void AddOp(grpc_op* ops, size_t* nops) {}
void FinishOp(bool* status) {}
void AddOp(grpc_op* /*ops*/, size_t* /*nops*/) {}
void FinishOp(bool* /*status*/) {}
void SetInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
}
};
class CallOpSendInitialMetadata {
@ -252,7 +256,7 @@ class CallOpSendInitialMetadata {
maybe_compression_level_.level;
}
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (!send_ || hijacked_) return;
g_core_codegen_interface->gpr_free(initial_metadata_);
send_ = false;
@ -267,9 +271,9 @@ class CallOpSendInitialMetadata {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -363,7 +367,7 @@ class CallOpSendMessage {
nullptr);
}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -605,7 +609,7 @@ class CallOpClientSendClose {
op->flags = 0;
op->reserved = NULL;
}
void FinishOp(bool* status) { send_ = false; }
void FinishOp(bool* /*status*/) { send_ = false; }
void SetInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {
@ -615,9 +619,9 @@ class CallOpClientSendClose {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -658,7 +662,7 @@ class CallOpServerSendStatus {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (!send_status_available_ || hijacked_) return;
g_core_codegen_interface->gpr_free(trailing_metadata_);
send_status_available_ = false;
@ -675,9 +679,9 @@ class CallOpServerSendStatus {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -712,7 +716,7 @@ class CallOpRecvInitialMetadata {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (metadata_map_ == nullptr || hijacked_) return;
}
@ -766,22 +770,27 @@ class CallOpClientRecvStatus {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (recv_status_ == nullptr || hijacked_) return;
grpc::string binary_error_details = metadata_map_->GetBinaryErrorDetails();
*recv_status_ =
Status(static_cast<StatusCode>(status_code_),
GRPC_SLICE_IS_EMPTY(error_message_)
? grpc::string()
: grpc::string(GRPC_SLICE_START_PTR(error_message_),
GRPC_SLICE_END_PTR(error_message_)),
binary_error_details);
client_context_->set_debug_error_string(
debug_error_string_ != nullptr ? debug_error_string_ : "");
g_core_codegen_interface->grpc_slice_unref(error_message_);
if (debug_error_string_ != nullptr) {
g_core_codegen_interface->gpr_free((void*)debug_error_string_);
if (static_cast<StatusCode>(status_code_) == StatusCode::OK) {
*recv_status_ = Status();
GPR_CODEGEN_DEBUG_ASSERT(debug_error_string_ == nullptr);
} else {
*recv_status_ =
Status(static_cast<StatusCode>(status_code_),
GRPC_SLICE_IS_EMPTY(error_message_)
? grpc::string()
: grpc::string(GRPC_SLICE_START_PTR(error_message_),
GRPC_SLICE_END_PTR(error_message_)),
metadata_map_->GetBinaryErrorDetails());
if (debug_error_string_ != nullptr) {
client_context_->set_debug_error_string(debug_error_string_);
g_core_codegen_interface->gpr_free((void*)debug_error_string_);
}
}
// TODO(soheil): Find callers that set debug string even for status OK,
// and fix them.
g_core_codegen_interface->grpc_slice_unref(error_message_);
}
void SetInterceptionHookPoint(

@ -69,7 +69,7 @@ class CallbackWithStatusTag
: public grpc_experimental_completion_queue_functor {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(CallbackWithStatusTag));
}
@ -133,7 +133,7 @@ class CallbackWithSuccessTag
: public grpc_experimental_completion_queue_functor {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(CallbackWithSuccessTag));
}

@ -154,10 +154,10 @@ class ChannelInterface {
// Returns an empty Call object (rather than being pure) since this is a new
// method and adding a new pure method to an interface would be a breaking
// change (even though this is private and non-API)
virtual internal::Call CreateCallInternal(const internal::RpcMethod& method,
::grpc_impl::ClientContext* context,
::grpc_impl::CompletionQueue* cq,
size_t interceptor_pos) {
virtual internal::Call CreateCallInternal(
const internal::RpcMethod& /*method*/,
::grpc_impl::ClientContext* /*context*/,
::grpc_impl::CompletionQueue* /*cq*/, size_t /*interceptor_pos*/) {
return internal::Call();
}

@ -72,11 +72,16 @@ class CallbackUnaryCallImpl {
grpc::internal::CallOpClientSendClose,
grpc::internal::CallOpClientRecvStatus>;
auto* ops = new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(FullCallOpSet))) FullCallOpSet;
auto* tag = new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(grpc::internal::CallbackWithStatusTag)))
struct OpSetAndTag {
FullCallOpSet opset;
grpc::internal::CallbackWithStatusTag tag;
};
const size_t alloc_sz = sizeof(OpSetAndTag);
auto* const alloced = static_cast<OpSetAndTag*>(
::grpc::g_core_codegen_interface->grpc_call_arena_alloc(call.call(),
alloc_sz));
auto* ops = new (&alloced->opset) FullCallOpSet;
auto* tag = new (&alloced->tag)
grpc::internal::CallbackWithStatusTag(call.call(), on_completion, ops);
// TODO(vjpai): Unify code with sync API as much as possible
@ -272,7 +277,7 @@ class ClientBidiReactor {
/// have completed and provides the RPC status outcome.
///
/// \param[in] s The status outcome of this RPC
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
/// Notifies the application that a read of initial metadata from the
/// server is done. If the application chooses not to implement this method,
@ -281,19 +286,19 @@ class ClientBidiReactor {
///
/// \param[in] ok Was the initial metadata read successfully? If false, no
/// further read-side operation will succeed.
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
/// Notifies the application that a StartRead operation completed.
///
/// \param[in] ok Was it successful? If false, no further read-side operation
/// will succeed.
virtual void OnReadDone(bool ok) {}
virtual void OnReadDone(bool /*ok*/) {}
/// Notifies the application that a StartWrite operation completed.
///
/// \param[in] ok Was it successful? If false, no further write-side operation
/// will succeed.
virtual void OnWriteDone(bool ok) {}
virtual void OnWriteDone(bool /*ok*/) {}
/// Notifies the application that a StartWritesDone operation completed. Note
/// that this is only used on explicit StartWritesDone operations and not for
@ -301,7 +306,7 @@ class ClientBidiReactor {
///
/// \param[in] ok Was it successful? If false, the application will later see
/// the failure reflected as a bad status in OnDone.
virtual void OnWritesDoneDone(bool ok) {}
virtual void OnWritesDoneDone(bool /*ok*/) {}
private:
friend class ClientCallbackReaderWriter<Request, Response>;
@ -325,9 +330,9 @@ class ClientReadReactor {
void AddMultipleHolds(int holds) { reader_->AddHold(holds); }
void RemoveHold() { reader_->RemoveHold(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
virtual void OnReadDone(bool /*ok*/) {}
private:
friend class ClientCallbackReader<Response>;
@ -358,10 +363,10 @@ class ClientWriteReactor {
void AddMultipleHolds(int holds) { writer_->AddHold(holds); }
void RemoveHold() { writer_->RemoveHold(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnWriteDone(bool ok) {}
virtual void OnWritesDoneDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
virtual void OnWriteDone(bool /*ok*/) {}
virtual void OnWritesDoneDone(bool /*ok*/) {}
private:
friend class ClientCallbackWriter<Request>;
@ -385,8 +390,8 @@ class ClientUnaryReactor {
virtual ~ClientUnaryReactor() {}
void StartCall() { call_->StartCall(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
private:
friend class ClientCallbackUnary;
@ -416,7 +421,7 @@ class ClientCallbackReaderWriterImpl
: public experimental::ClientCallbackReaderWriter<Request, Response> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackReaderWriterImpl));
}
@ -490,7 +495,7 @@ class ClientCallbackReaderWriterImpl
call_.PerformOps(&writes_done_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -628,7 +633,7 @@ class ClientCallbackReaderImpl
: public experimental::ClientCallbackReader<Response> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackReaderImpl));
}
@ -682,7 +687,7 @@ class ClientCallbackReaderImpl
call_.PerformOps(&read_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -768,7 +773,7 @@ class ClientCallbackWriterImpl
: public experimental::ClientCallbackWriter<Request> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackWriterImpl));
}
@ -830,7 +835,7 @@ class ClientCallbackWriterImpl
call_.PerformOps(&writes_done_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -956,7 +961,7 @@ class ClientCallbackWriterFactory {
class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackUnaryImpl));
}
@ -985,7 +990,7 @@ class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary {
start_ops_.set_core_cq_tag(&start_tag_);
call_.PerformOps(&start_ops_);
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);

@ -310,11 +310,11 @@ class ClientContext {
/// client’s identity, role, or whether it is authorized to make a particular
/// call.
///
/// It is legal to call this only before initial metadata is sent.
///
/// \see https://grpc.io/docs/guides/auth.html
void set_credentials(
const std::shared_ptr<grpc_impl::CallCredentials>& creds) {
creds_ = creds;
}
const std::shared_ptr<grpc_impl::CallCredentials>& creds);
/// Return the compression algorithm the client call will request be used.
/// Note that the gRPC runtime may decide to ignore this request, for example,

@ -60,28 +60,27 @@ class ServerWriter;
namespace internal {
template <class W, class R>
class ServerReaderWriterBody;
} // namespace internal
} // namespace grpc_impl
namespace grpc {
class ChannelInterface;
class ServerInterface;
namespace internal {
class CompletionQueueTag;
class RpcMethod;
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
class BidiStreamingHandler;
template <class Streamer, bool WriteNeeded>
class TemplatedBidiStreamingHandler;
template <StatusCode code>
template <::grpc::StatusCode code>
class ErrorMethodHandler;
} // namespace internal
} // namespace grpc_impl
namespace grpc {
class ChannelInterface;
class ServerInterface;
namespace internal {
class CompletionQueueTag;
class RpcMethod;
template <class InputMessage, class OutputMessage>
class BlockingUnaryCallImpl;
template <class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
@ -266,15 +265,15 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
template <class W, class R>
friend class ::grpc_impl::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType>
friend class ::grpc::internal::RpcMethodHandler;
friend class ::grpc_impl::internal::RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ::grpc::internal::ClientStreamingHandler;
friend class ::grpc_impl::internal::ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ::grpc::internal::ServerStreamingHandler;
friend class ::grpc_impl::internal::ServerStreamingHandler;
template <class Streamer, bool WriteNeeded>
friend class ::grpc::internal::TemplatedBidiStreamingHandler;
friend class ::grpc_impl::internal::TemplatedBidiStreamingHandler;
template <::grpc::StatusCode code>
friend class ::grpc::internal::ErrorMethodHandler;
friend class ::grpc_impl::internal::ErrorMethodHandler;
friend class ::grpc_impl::Server;
friend class ::grpc_impl::ServerContext;
friend class ::grpc::ServerInterface;

@ -21,11 +21,6 @@
#define GRPC_OPEN_SOURCE_PROTO
#ifndef GRPC_CUSTOM_PROTOBUF_INT64
#include <google/protobuf/stubs/common.h>
#define GRPC_CUSTOM_PROTOBUF_INT64 ::google::protobuf::int64
#endif
#ifndef GRPC_CUSTOM_MESSAGE
#ifdef GRPC_USE_PROTO_LITE
#include <google/protobuf/message_lite.h>
@ -79,7 +74,6 @@ namespace protobuf {
typedef GRPC_CUSTOM_MESSAGE Message;
typedef GRPC_CUSTOM_MESSAGELITE MessageLite;
typedef GRPC_CUSTOM_PROTOBUF_INT64 int64;
typedef GRPC_CUSTOM_DESCRIPTOR Descriptor;
typedef GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool;

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

Loading…
Cancel
Save