Merge github.com:grpc/grpc into fuzz-me

pull/6753/head
Craig Tiller 9 years ago
commit da901c2a84
  1. 473
      BUILD
  2. 585
      Makefile
  3. 24
      binding.gyp
  4. 135
      build.yaml
  5. 27
      config.m4
  6. 32
      examples/node/static_codegen/helloworld_grpc_pb.js
  7. 4
      examples/node/static_codegen/helloworld_pb.js
  8. 51
      examples/node/static_codegen/route_guide/route_guide_grpc_pb.js
  9. 10
      examples/node/static_codegen/route_guide/route_guide_pb.js
  10. 34
      examples/ruby/lib/helloworld_services.rb
  11. 53
      examples/ruby/lib/route_guide_services.rb
  12. 55
      gRPC.podspec
  13. 1
      grpc.def
  14. 47
      grpc.gemspec
  15. 1
      include/grpc++/impl/codegen/async_stream.h
  16. 1
      include/grpc++/impl/codegen/async_unary_call.h
  17. 20
      include/grpc++/impl/codegen/call.h
  18. 2
      include/grpc++/impl/codegen/core_codegen_interface.h
  19. 1
      include/grpc++/impl/codegen/sync_stream.h
  20. 4
      include/grpc/impl/codegen/atm.h
  21. 6
      include/grpc/impl/codegen/atm_windows.h
  22. 2
      include/grpc/impl/codegen/connectivity_state.h
  23. 2
      include/grpc/impl/codegen/grpc_types.h
  24. 22
      include/grpc/impl/codegen/port_platform.h
  25. 4
      include/grpc/impl/codegen/sync.h
  26. 6
      include/grpc/impl/codegen/sync_windows.h
  27. 8
      include/grpc/support/atm_windows.h
  28. 6
      include/grpc/support/log_windows.h
  29. 39
      include/grpc/support/sync_win32.h
  30. 8
      include/grpc/support/sync_windows.h
  31. 47
      package.xml
  32. 11
      src/compiler/config.h
  33. 7
      src/compiler/cpp_generator_helpers.h
  34. 2
      src/compiler/cpp_plugin.cc
  35. 119
      src/compiler/csharp_generator.cc
  36. 7
      src/compiler/csharp_generator_helpers.h
  37. 8
      src/compiler/generator_helpers.h
  38. 73
      src/compiler/node_generator.cc
  39. 6
      src/compiler/node_generator.h
  40. 7
      src/compiler/node_generator_helpers.h
  41. 8
      src/compiler/node_plugin.cc
  42. 18
      src/compiler/ruby_generator.cc
  43. 8
      src/compiler/ruby_generator_helpers-inl.h
  44. 12
      src/core/ext/census/grpc_filter.c
  45. 2
      src/core/ext/client_config/channel_connectivity.c
  46. 25
      src/core/ext/client_config/client_channel.c
  47. 4
      src/core/ext/client_config/lb_policy.c
  48. 6
      src/core/ext/client_config/lb_policy.h
  49. 10
      src/core/ext/client_config/subchannel.c
  50. 3
      src/core/ext/client_config/subchannel.h
  51. 5
      src/core/ext/client_config/subchannel_call_holder.c
  52. 3
      src/core/ext/client_config/subchannel_call_holder.h
  53. 36
      src/core/ext/lb_policy/pick_first/pick_first.c
  54. 28
      src/core/ext/lb_policy/round_robin/round_robin.c
  55. 132
      src/core/ext/load_reporting/load_reporting.c
  56. 75
      src/core/ext/load_reporting/load_reporting.h
  57. 151
      src/core/ext/load_reporting/load_reporting_filter.c
  58. 12
      src/core/ext/load_reporting/load_reporting_filter.h
  59. 18
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  60. 18
      src/core/ext/transport/cronet/transport/cronet_transport.c
  61. 16
      src/core/lib/channel/channel_stack.c
  62. 33
      src/core/lib/channel/channel_stack.h
  63. 4
      src/core/lib/channel/compress_filter.c
  64. 12
      src/core/lib/channel/connected_channel.c
  65. 4
      src/core/lib/channel/http_client_filter.c
  66. 4
      src/core/lib/channel/http_server_filter.c
  67. 23
      src/core/lib/http/httpcli.c
  68. 5
      src/core/lib/http/httpcli.h
  69. 2
      src/core/lib/iomgr/iocp_windows.c
  70. 2
      src/core/lib/iomgr/iomgr_windows.c
  71. 104
      src/core/lib/iomgr/polling_entity.c
  72. 81
      src/core/lib/iomgr/polling_entity.h
  73. 5
      src/core/lib/iomgr/pollset_set_windows.c
  74. 2
      src/core/lib/iomgr/resolve_address_windows.c
  75. 4
      src/core/lib/iomgr/sockaddr.h
  76. 6
      src/core/lib/iomgr/sockaddr_windows.h
  77. 2
      src/core/lib/iomgr/socket_windows.c
  78. 4
      src/core/lib/iomgr/tcp_client_windows.c
  79. 2
      src/core/lib/iomgr/tcp_server_windows.c
  80. 4
      src/core/lib/iomgr/tcp_windows.c
  81. 4
      src/core/lib/iomgr/timer.c
  82. 2
      src/core/lib/iomgr/workqueue.h
  83. 4
      src/core/lib/iomgr/workqueue_windows.c
  84. 13
      src/core/lib/security/credentials/composite/composite_credentials.c
  85. 4
      src/core/lib/security/credentials/credentials.c
  86. 6
      src/core/lib/security/credentials/credentials.h
  87. 2
      src/core/lib/security/credentials/fake/fake_credentials.c
  88. 4
      src/core/lib/security/credentials/google_default/credentials_windows.c
  89. 25
      src/core/lib/security/credentials/google_default/google_default_credentials.c
  90. 2
      src/core/lib/security/credentials/iam/iam_credentials.c
  91. 2
      src/core/lib/security/credentials/jwt/jwt_credentials.c
  92. 11
      src/core/lib/security/credentials/jwt/jwt_verifier.c
  93. 14
      src/core/lib/security/credentials/oauth2/oauth2_credentials.c
  94. 2
      src/core/lib/security/credentials/oauth2/oauth2_credentials.h
  95. 2
      src/core/lib/security/credentials/plugin/plugin_credentials.c
  96. 39
      src/core/lib/security/transport/client_auth_filter.c
  97. 20
      src/core/lib/security/transport/server_auth_filter.c
  98. 4
      src/core/lib/support/cpu_windows.c
  99. 6
      src/core/lib/support/env_windows.c
  100. 8
      src/core/lib/support/log_windows.c
  101. Some files were not shown because too many files have changed in this diff Show More

473
BUILD

@ -53,7 +53,7 @@ cc_library(
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
"src/core/lib/support/string_win32.h", "src/core/lib/support/string_windows.h",
"src/core/lib/support/thd_internal.h", "src/core/lib/support/thd_internal.h",
"src/core/lib/support/time_precise.h", "src/core/lib/support/time_precise.h",
"src/core/lib/support/tmpfile.h", "src/core/lib/support/tmpfile.h",
@ -69,7 +69,7 @@ cc_library(
"src/core/lib/support/cpu_windows.c", "src/core/lib/support/cpu_windows.c",
"src/core/lib/support/env_linux.c", "src/core/lib/support/env_linux.c",
"src/core/lib/support/env_posix.c", "src/core/lib/support/env_posix.c",
"src/core/lib/support/env_win32.c", "src/core/lib/support/env_windows.c",
"src/core/lib/support/histogram.c", "src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c", "src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c", "src/core/lib/support/load_file.c",
@ -77,31 +77,31 @@ cc_library(
"src/core/lib/support/log_android.c", "src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c", "src/core/lib/support/log_posix.c",
"src/core/lib/support/log_win32.c", "src/core/lib/support/log_windows.c",
"src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.c",
"src/core/lib/support/slice.c", "src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c", "src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c", "src/core/lib/support/stack_lockfree.c",
"src/core/lib/support/string.c", "src/core/lib/support/string.c",
"src/core/lib/support/string_posix.c", "src/core/lib/support/string_posix.c",
"src/core/lib/support/string_util_win32.c", "src/core/lib/support/string_util_windows.c",
"src/core/lib/support/string_win32.c", "src/core/lib/support/string_windows.c",
"src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_posix.c",
"src/core/lib/support/subprocess_windows.c", "src/core/lib/support/subprocess_windows.c",
"src/core/lib/support/sync.c", "src/core/lib/support/sync.c",
"src/core/lib/support/sync_posix.c", "src/core/lib/support/sync_posix.c",
"src/core/lib/support/sync_win32.c", "src/core/lib/support/sync_windows.c",
"src/core/lib/support/thd.c", "src/core/lib/support/thd.c",
"src/core/lib/support/thd_posix.c", "src/core/lib/support/thd_posix.c",
"src/core/lib/support/thd_win32.c", "src/core/lib/support/thd_windows.c",
"src/core/lib/support/time.c", "src/core/lib/support/time.c",
"src/core/lib/support/time_posix.c", "src/core/lib/support/time_posix.c",
"src/core/lib/support/time_precise.c", "src/core/lib/support/time_precise.c",
"src/core/lib/support/time_win32.c", "src/core/lib/support/time_windows.c",
"src/core/lib/support/tls_pthread.c", "src/core/lib/support/tls_pthread.c",
"src/core/lib/support/tmpfile_msys.c", "src/core/lib/support/tmpfile_msys.c",
"src/core/lib/support/tmpfile_posix.c", "src/core/lib/support/tmpfile_posix.c",
"src/core/lib/support/tmpfile_win32.c", "src/core/lib/support/tmpfile_windows.c",
"src/core/lib/support/wrap_memcpy.c", "src/core/lib/support/wrap_memcpy.c",
], ],
hdrs = [ hdrs = [
@ -109,14 +109,14 @@ cc_library(
"include/grpc/support/atm.h", "include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h", "include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_win32.h", "include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h", "include/grpc/support/avl.h",
"include/grpc/support/cmdline.h", "include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h", "include/grpc/support/cpu.h",
"include/grpc/support/histogram.h", "include/grpc/support/histogram.h",
"include/grpc/support/host_port.h", "include/grpc/support/host_port.h",
"include/grpc/support/log.h", "include/grpc/support/log.h",
"include/grpc/support/log_win32.h", "include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h", "include/grpc/support/port_platform.h",
"include/grpc/support/slice.h", "include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h", "include/grpc/support/slice_buffer.h",
@ -125,7 +125,7 @@ cc_library(
"include/grpc/support/sync.h", "include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h", "include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h", "include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h", "include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h", "include/grpc/support/thd.h",
"include/grpc/support/time.h", "include/grpc/support/time.h",
"include/grpc/support/tls.h", "include/grpc/support/tls.h",
@ -137,7 +137,7 @@ cc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -145,7 +145,7 @@ cc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
], ],
includes = [ includes = [
@ -187,6 +187,7 @@ cc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -195,7 +196,7 @@ cc_library(
"src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_win32.h", "src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_client.h",
@ -295,9 +296,10 @@ cc_library(
"src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"third_party/objective_c/Cronet/cronet_c_for_grpc.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h", "src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h", "src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/census_rpc_stats.h",
@ -332,6 +334,7 @@ cc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -418,7 +421,7 @@ cc_library(
"src/core/lib/security/credentials/credentials_metadata.c", "src/core/lib/security/credentials/credentials_metadata.c",
"src/core/lib/security/credentials/fake/fake_credentials.c", "src/core/lib/security/credentials/fake/fake_credentials.c",
"src/core/lib/security/credentials/google_default/credentials_posix.c", "src/core/lib/security/credentials/google_default/credentials_posix.c",
"src/core/lib/security/credentials/google_default/credentials_win32.c", "src/core/lib/security/credentials/google_default/credentials_windows.c",
"src/core/lib/security/credentials/google_default/google_default_credentials.c", "src/core/lib/security/credentials/google_default/google_default_credentials.c",
"src/core/lib/security/credentials/iam/iam_credentials.c", "src/core/lib/security/credentials/iam/iam_credentials.c",
"src/core/lib/security/credentials/jwt/json_token.c", "src/core/lib/security/credentials/jwt/json_token.c",
@ -460,15 +463,14 @@ cc_library(
"src/core/ext/client_config/uri_parser.c", "src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
"src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
"src/core/ext/transport/cronet/transport/cronet_transport.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/census/context.c", "src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c", "src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_context.c",
@ -498,7 +500,7 @@ cc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -506,9 +508,8 @@ cc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h", "include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/census.h", "include/grpc/census.h",
@ -530,6 +531,346 @@ cc_library(
cc_library(
name = "grpc_cronet",
srcs = [
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
"src/core/lib/channel/compress_filter.h",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
"src/core/lib/http/format_request.h",
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/resolve_address.h",
"src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/workqueue.h",
"src/core/lib/iomgr/workqueue_posix.h",
"src/core/lib/iomgr/workqueue_windows.h",
"src/core/lib/json/json.h",
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
"src/core/lib/surface/channel.h",
"src/core/lib/surface/channel_init.h",
"src/core/lib/surface/channel_stack_type.h",
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"third_party/objective_c/Cronet/cronet_c_for_grpc.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h",
"src/core/ext/transport/chttp2/transport/frame_data.h",
"src/core/ext/transport/chttp2/transport/frame_goaway.h",
"src/core/ext/transport/chttp2/transport/frame_ping.h",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.h",
"src/core/ext/transport/chttp2/transport/frame_settings.h",
"src/core/ext/transport/chttp2/transport/frame_window_update.h",
"src/core/ext/transport/chttp2/transport/hpack_encoder.h",
"src/core/ext/transport/chttp2/transport/hpack_parser.h",
"src/core/ext/transport/chttp2/transport/hpack_table.h",
"src/core/ext/transport/chttp2/transport/http2_errors.h",
"src/core/ext/transport/chttp2/transport/huffsyms.h",
"src/core/ext/transport/chttp2/transport/incoming_metadata.h",
"src/core/ext/transport/chttp2/transport/internal.h",
"src/core/ext/transport/chttp2/transport/status_conversion.h",
"src/core/ext/transport/chttp2/transport/stream_map.h",
"src/core/ext/transport/chttp2/transport/timeout_encoding.h",
"src/core/ext/transport/chttp2/transport/varint.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
"src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
"src/core/ext/client_config/lb_policy_factory.h",
"src/core/ext/client_config/lb_policy_registry.h",
"src/core/ext/client_config/parse_address.h",
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/lib/security/context/security_context.h",
"src/core/lib/security/credentials/composite/composite_credentials.h",
"src/core/lib/security/credentials/credentials.h",
"src/core/lib/security/credentials/fake/fake_credentials.h",
"src/core/lib/security/credentials/google_default/google_default_credentials.h",
"src/core/lib/security/credentials/iam/iam_credentials.h",
"src/core/lib/security/credentials/jwt/json_token.h",
"src/core/lib/security/credentials/jwt/jwt_credentials.h",
"src/core/lib/security/credentials/jwt/jwt_verifier.h",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/transport/auth_filters.h",
"src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h",
"src/core/lib/tsi/fake_transport_security.h",
"src/core/lib/tsi/ssl_transport_security.h",
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
"src/core/lib/surface/init.c",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
"src/core/lib/channel/compress_filter.c",
"src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c",
"src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c",
"src/core/lib/iomgr/executor.c",
"src/core/lib/iomgr/iocp_windows.c",
"src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c",
"src/core/lib/iomgr/resolve_address_windows.c",
"src/core/lib/iomgr/sockaddr_utils.c",
"src/core/lib/iomgr/socket_utils_common_posix.c",
"src/core/lib/iomgr/socket_utils_linux.c",
"src/core/lib/iomgr/socket_utils_posix.c",
"src/core/lib/iomgr/socket_windows.c",
"src/core/lib/iomgr/tcp_client_posix.c",
"src/core/lib/iomgr/tcp_client_windows.c",
"src/core/lib/iomgr/tcp_posix.c",
"src/core/lib/iomgr/tcp_server_posix.c",
"src/core/lib/iomgr/tcp_server_windows.c",
"src/core/lib/iomgr/tcp_windows.c",
"src/core/lib/iomgr/time_averaged_stats.c",
"src/core/lib/iomgr/timer.c",
"src/core/lib/iomgr/timer_heap.c",
"src/core/lib/iomgr/udp_server.c",
"src/core/lib/iomgr/unix_sockets_posix.c",
"src/core/lib/iomgr/unix_sockets_posix_noop.c",
"src/core/lib/iomgr/wakeup_fd_eventfd.c",
"src/core/lib/iomgr/wakeup_fd_nospecial.c",
"src/core/lib/iomgr/wakeup_fd_pipe.c",
"src/core/lib/iomgr/wakeup_fd_posix.c",
"src/core/lib/iomgr/workqueue_posix.c",
"src/core/lib/iomgr/workqueue_windows.c",
"src/core/lib/json/json.c",
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
"src/core/lib/surface/byte_buffer_reader.c",
"src/core/lib/surface/call.c",
"src/core/lib/surface/call_details.c",
"src/core/lib/surface/call_log_batch.c",
"src/core/lib/surface/channel.c",
"src/core/lib/surface/channel_init.c",
"src/core/lib/surface/channel_ping.c",
"src/core/lib/surface/channel_stack_type.c",
"src/core/lib/surface/completion_queue.c",
"src/core/lib/surface/event_string.c",
"src/core/lib/surface/lame_client.c",
"src/core/lib/surface/metadata_array.c",
"src/core/lib/surface/server.c",
"src/core/lib/surface/validate_metadata.c",
"src/core/lib/surface/version.c",
"src/core/lib/transport/byte_stream.c",
"src/core/lib/transport/connectivity_state.c",
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
"src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
"src/core/ext/transport/cronet/transport/cronet_transport.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c",
"src/core/ext/transport/chttp2/transport/frame_data.c",
"src/core/ext/transport/chttp2/transport/frame_goaway.c",
"src/core/ext/transport/chttp2/transport/frame_ping.c",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.c",
"src/core/ext/transport/chttp2/transport/frame_settings.c",
"src/core/ext/transport/chttp2/transport/frame_window_update.c",
"src/core/ext/transport/chttp2/transport/hpack_encoder.c",
"src/core/ext/transport/chttp2/transport/hpack_parser.c",
"src/core/ext/transport/chttp2/transport/hpack_table.c",
"src/core/ext/transport/chttp2/transport/huffsyms.c",
"src/core/ext/transport/chttp2/transport/incoming_metadata.c",
"src/core/ext/transport/chttp2/transport/parsing.c",
"src/core/ext/transport/chttp2/transport/status_conversion.c",
"src/core/ext/transport/chttp2/transport/stream_lists.c",
"src/core/ext/transport/chttp2/transport/stream_map.c",
"src/core/ext/transport/chttp2/transport/timeout_encoding.c",
"src/core/ext/transport/chttp2/transport/varint.c",
"src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
"src/core/ext/client_config/initial_connect_string.c",
"src/core/ext/client_config/lb_policy.c",
"src/core/ext/client_config/lb_policy_factory.c",
"src/core/ext/client_config/lb_policy_registry.c",
"src/core/ext/client_config/parse_address.c",
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/lib/http/httpcli_security_connector.c",
"src/core/lib/security/context/security_context.c",
"src/core/lib/security/credentials/composite/composite_credentials.c",
"src/core/lib/security/credentials/credentials.c",
"src/core/lib/security/credentials/credentials_metadata.c",
"src/core/lib/security/credentials/fake/fake_credentials.c",
"src/core/lib/security/credentials/google_default/credentials_posix.c",
"src/core/lib/security/credentials/google_default/credentials_windows.c",
"src/core/lib/security/credentials/google_default/google_default_credentials.c",
"src/core/lib/security/credentials/iam/iam_credentials.c",
"src/core/lib/security/credentials/jwt/json_token.c",
"src/core/lib/security/credentials/jwt/jwt_credentials.c",
"src/core/lib/security/credentials/jwt/jwt_verifier.c",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.c",
"src/core/lib/security/credentials/plugin/plugin_credentials.c",
"src/core/lib/security/credentials/ssl/ssl_credentials.c",
"src/core/lib/security/transport/client_auth_filter.c",
"src/core/lib/security/transport/handshake.c",
"src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c",
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
"src/core/plugin_registry/grpc_cronet_plugin_registry.c",
],
hdrs = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h",
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
],
includes = [
"include",
".",
],
deps = [
"//external:libssl",
":gpr",
],
)
cc_library( cc_library(
name = "grpc_unsecure", name = "grpc_unsecure",
srcs = [ srcs = [
@ -559,6 +900,7 @@ cc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -567,7 +909,7 @@ cc_library(
"src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_win32.h", "src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_client.h",
@ -644,6 +986,8 @@ cc_library(
"src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/census/aggregation.h", "src/core/ext/census/aggregation.h",
@ -681,6 +1025,7 @@ cc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -782,6 +1127,8 @@ cc_library(
"src/core/ext/client_config/uri_parser.c", "src/core/ext/client_config/uri_parser.c",
"src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/pick_first/pick_first.c",
@ -815,7 +1162,7 @@ cc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -823,7 +1170,7 @@ cc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc/census.h", "include/grpc/census.h",
], ],
@ -917,7 +1264,6 @@ cc_library(
"include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/grpc_library.h", "include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/proto_utils.h",
"include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/serialization_traits.h",
@ -942,6 +1288,7 @@ cc_library(
"include/grpc++/support/async_unary_call.h", "include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h", "include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h", "include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h", "include/grpc++/support/slice.h",
"include/grpc++/support/status.h", "include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h", "include/grpc++/support/status_code_enum.h",
@ -958,11 +1305,11 @@ cc_library(
"include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/client_unary_call.h",
"include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue.h",
"include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/completion_queue_tag.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/core_codegen_interface.h",
"include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/create_auth_context.h",
"include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/grpc_library.h",
"include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/method_handler_impl.h",
"include/grpc++/impl/codegen/proto_utils.h",
"include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_method.h",
"include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/rpc_service_method.h",
"include/grpc++/impl/codegen/security/auth_context.h", "include/grpc++/impl/codegen/security/auth_context.h",
@ -990,7 +1337,7 @@ cc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -998,12 +1345,8 @@ cc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h",
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
], ],
includes = [ includes = [
"include", "include",
@ -1065,7 +1408,6 @@ cc_library(
"include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/grpc_library.h", "include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/proto_utils.h",
"include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/serialization_traits.h",
@ -1090,6 +1432,7 @@ cc_library(
"include/grpc++/support/async_unary_call.h", "include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h", "include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h", "include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h", "include/grpc++/support/slice.h",
"include/grpc++/support/status.h", "include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h", "include/grpc++/support/status_code_enum.h",
@ -1106,11 +1449,11 @@ cc_library(
"include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/client_unary_call.h",
"include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue.h",
"include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/completion_queue_tag.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/core_codegen_interface.h",
"include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/create_auth_context.h",
"include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/grpc_library.h",
"include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/method_handler_impl.h",
"include/grpc++/impl/codegen/proto_utils.h",
"include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_method.h",
"include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/rpc_service_method.h",
"include/grpc++/impl/codegen/security/auth_context.h", "include/grpc++/impl/codegen/security/auth_context.h",
@ -1138,7 +1481,7 @@ cc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -1146,12 +1489,8 @@ cc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h",
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
], ],
includes = [ includes = [
"include", "include",
@ -1193,9 +1532,6 @@ cc_library(
"src/compiler/ruby_generator.cc", "src/compiler/ruby_generator.cc",
], ],
hdrs = [ hdrs = [
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h", "include/grpc++/impl/codegen/config_protobuf.h",
], ],
includes = [ includes = [
@ -1244,7 +1580,7 @@ objc_library(
"src/core/lib/support/cpu_windows.c", "src/core/lib/support/cpu_windows.c",
"src/core/lib/support/env_linux.c", "src/core/lib/support/env_linux.c",
"src/core/lib/support/env_posix.c", "src/core/lib/support/env_posix.c",
"src/core/lib/support/env_win32.c", "src/core/lib/support/env_windows.c",
"src/core/lib/support/histogram.c", "src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c", "src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c", "src/core/lib/support/load_file.c",
@ -1252,31 +1588,31 @@ objc_library(
"src/core/lib/support/log_android.c", "src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c", "src/core/lib/support/log_posix.c",
"src/core/lib/support/log_win32.c", "src/core/lib/support/log_windows.c",
"src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.c",
"src/core/lib/support/slice.c", "src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c", "src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c", "src/core/lib/support/stack_lockfree.c",
"src/core/lib/support/string.c", "src/core/lib/support/string.c",
"src/core/lib/support/string_posix.c", "src/core/lib/support/string_posix.c",
"src/core/lib/support/string_util_win32.c", "src/core/lib/support/string_util_windows.c",
"src/core/lib/support/string_win32.c", "src/core/lib/support/string_windows.c",
"src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_posix.c",
"src/core/lib/support/subprocess_windows.c", "src/core/lib/support/subprocess_windows.c",
"src/core/lib/support/sync.c", "src/core/lib/support/sync.c",
"src/core/lib/support/sync_posix.c", "src/core/lib/support/sync_posix.c",
"src/core/lib/support/sync_win32.c", "src/core/lib/support/sync_windows.c",
"src/core/lib/support/thd.c", "src/core/lib/support/thd.c",
"src/core/lib/support/thd_posix.c", "src/core/lib/support/thd_posix.c",
"src/core/lib/support/thd_win32.c", "src/core/lib/support/thd_windows.c",
"src/core/lib/support/time.c", "src/core/lib/support/time.c",
"src/core/lib/support/time_posix.c", "src/core/lib/support/time_posix.c",
"src/core/lib/support/time_precise.c", "src/core/lib/support/time_precise.c",
"src/core/lib/support/time_win32.c", "src/core/lib/support/time_windows.c",
"src/core/lib/support/tls_pthread.c", "src/core/lib/support/tls_pthread.c",
"src/core/lib/support/tmpfile_msys.c", "src/core/lib/support/tmpfile_msys.c",
"src/core/lib/support/tmpfile_posix.c", "src/core/lib/support/tmpfile_posix.c",
"src/core/lib/support/tmpfile_win32.c", "src/core/lib/support/tmpfile_windows.c",
"src/core/lib/support/wrap_memcpy.c", "src/core/lib/support/wrap_memcpy.c",
], ],
hdrs = [ hdrs = [
@ -1284,14 +1620,14 @@ objc_library(
"include/grpc/support/atm.h", "include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h", "include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_win32.h", "include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h", "include/grpc/support/avl.h",
"include/grpc/support/cmdline.h", "include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h", "include/grpc/support/cpu.h",
"include/grpc/support/histogram.h", "include/grpc/support/histogram.h",
"include/grpc/support/host_port.h", "include/grpc/support/host_port.h",
"include/grpc/support/log.h", "include/grpc/support/log.h",
"include/grpc/support/log_win32.h", "include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h", "include/grpc/support/port_platform.h",
"include/grpc/support/slice.h", "include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h", "include/grpc/support/slice_buffer.h",
@ -1300,7 +1636,7 @@ objc_library(
"include/grpc/support/sync.h", "include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h", "include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h", "include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h", "include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h", "include/grpc/support/thd.h",
"include/grpc/support/time.h", "include/grpc/support/time.h",
"include/grpc/support/tls.h", "include/grpc/support/tls.h",
@ -1312,7 +1648,7 @@ objc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -1320,7 +1656,7 @@ objc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"src/core/lib/profiling/timers.h", "src/core/lib/profiling/timers.h",
"src/core/lib/support/backoff.h", "src/core/lib/support/backoff.h",
@ -1330,7 +1666,7 @@ objc_library(
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
"src/core/lib/support/string_win32.h", "src/core/lib/support/string_windows.h",
"src/core/lib/support/thd_internal.h", "src/core/lib/support/thd_internal.h",
"src/core/lib/support/time_precise.h", "src/core/lib/support/time_precise.h",
"src/core/lib/support/tmpfile.h", "src/core/lib/support/tmpfile.h",
@ -1375,6 +1711,7 @@ objc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -1461,7 +1798,7 @@ objc_library(
"src/core/lib/security/credentials/credentials_metadata.c", "src/core/lib/security/credentials/credentials_metadata.c",
"src/core/lib/security/credentials/fake/fake_credentials.c", "src/core/lib/security/credentials/fake/fake_credentials.c",
"src/core/lib/security/credentials/google_default/credentials_posix.c", "src/core/lib/security/credentials/google_default/credentials_posix.c",
"src/core/lib/security/credentials/google_default/credentials_win32.c", "src/core/lib/security/credentials/google_default/credentials_windows.c",
"src/core/lib/security/credentials/google_default/google_default_credentials.c", "src/core/lib/security/credentials/google_default/google_default_credentials.c",
"src/core/lib/security/credentials/iam/iam_credentials.c", "src/core/lib/security/credentials/iam/iam_credentials.c",
"src/core/lib/security/credentials/jwt/json_token.c", "src/core/lib/security/credentials/jwt/json_token.c",
@ -1503,15 +1840,14 @@ objc_library(
"src/core/ext/client_config/uri_parser.c", "src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
"src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
"src/core/ext/transport/cronet/transport/cronet_transport.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/load_reporting/load_reporting.c",
"src/core/ext/load_reporting/load_reporting_filter.c",
"src/core/ext/census/context.c", "src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c", "src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_context.c",
@ -1541,7 +1877,7 @@ objc_library(
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h",
@ -1549,9 +1885,8 @@ objc_library(
"include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h", "include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/census.h", "include/grpc/census.h",
@ -1581,6 +1916,7 @@ objc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -1589,7 +1925,7 @@ objc_library(
"src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_win32.h", "src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_client.h",
@ -1689,9 +2025,10 @@ objc_library(
"src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"third_party/objective_c/Cronet/cronet_c_for_grpc.h",
"src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"src/core/ext/load_reporting/load_reporting.h",
"src/core/ext/load_reporting/load_reporting_filter.h",
"src/core/ext/census/aggregation.h", "src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h", "src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/census_rpc_stats.h",

File diff suppressed because it is too large Load Diff

@ -507,7 +507,7 @@
'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/cpu_windows.c',
'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_linux.c',
'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_posix.c',
'src/core/lib/support/env_win32.c', 'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.c', 'src/core/lib/support/histogram.c',
'src/core/lib/support/host_port.c', 'src/core/lib/support/host_port.c',
'src/core/lib/support/load_file.c', 'src/core/lib/support/load_file.c',
@ -515,31 +515,31 @@
'src/core/lib/support/log_android.c', 'src/core/lib/support/log_android.c',
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c', 'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_win32.c', 'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/slice.c', 'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/stack_lockfree.c',
'src/core/lib/support/string.c', 'src/core/lib/support/string.c',
'src/core/lib/support/string_posix.c', 'src/core/lib/support/string_posix.c',
'src/core/lib/support/string_util_win32.c', 'src/core/lib/support/string_util_windows.c',
'src/core/lib/support/string_win32.c', 'src/core/lib/support/string_windows.c',
'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_posix.c',
'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/subprocess_windows.c',
'src/core/lib/support/sync.c', 'src/core/lib/support/sync.c',
'src/core/lib/support/sync_posix.c', 'src/core/lib/support/sync_posix.c',
'src/core/lib/support/sync_win32.c', 'src/core/lib/support/sync_windows.c',
'src/core/lib/support/thd.c', 'src/core/lib/support/thd.c',
'src/core/lib/support/thd_posix.c', 'src/core/lib/support/thd_posix.c',
'src/core/lib/support/thd_win32.c', 'src/core/lib/support/thd_windows.c',
'src/core/lib/support/time.c', 'src/core/lib/support/time.c',
'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_posix.c',
'src/core/lib/support/time_precise.c', 'src/core/lib/support/time_precise.c',
'src/core/lib/support/time_win32.c', 'src/core/lib/support/time_windows.c',
'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tls_pthread.c',
'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_msys.c',
'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/tmpfile_windows.c',
'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/support/wrap_memcpy.c',
], ],
"conditions": [ "conditions": [
@ -590,6 +590,7 @@
'src/core/lib/iomgr/iomgr.c', 'src/core/lib/iomgr/iomgr.c',
'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_posix.c',
'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/iomgr_windows.c',
'src/core/lib/iomgr/polling_entity.c',
'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c',
'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/pollset_windows.c',
'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_posix.c',
@ -676,7 +677,7 @@
'src/core/lib/security/credentials/credentials_metadata.c', 'src/core/lib/security/credentials/credentials_metadata.c',
'src/core/lib/security/credentials/fake/fake_credentials.c', 'src/core/lib/security/credentials/fake/fake_credentials.c',
'src/core/lib/security/credentials/google_default/credentials_posix.c', 'src/core/lib/security/credentials/google_default/credentials_posix.c',
'src/core/lib/security/credentials/google_default/credentials_win32.c', 'src/core/lib/security/credentials/google_default/credentials_windows.c',
'src/core/lib/security/credentials/google_default/google_default_credentials.c', 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
'src/core/lib/security/credentials/iam/iam_credentials.c', 'src/core/lib/security/credentials/iam/iam_credentials.c',
'src/core/lib/security/credentials/jwt/json_token.c', 'src/core/lib/security/credentials/jwt/json_token.c',
@ -718,9 +719,6 @@
'src/core/ext/client_config/uri_parser.c', 'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
'src/core/ext/transport/cronet/transport/cronet_api_dummy.c',
'src/core/ext/transport/cronet/transport/cronet_transport.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_common.c',
@ -730,6 +728,8 @@
'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/census/context.c', 'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_context.c',

@ -41,14 +41,14 @@ filegroups:
- include/grpc/support/atm.h - include/grpc/support/atm.h
- include/grpc/support/atm_gcc_atomic.h - include/grpc/support/atm_gcc_atomic.h
- include/grpc/support/atm_gcc_sync.h - include/grpc/support/atm_gcc_sync.h
- include/grpc/support/atm_win32.h - include/grpc/support/atm_windows.h
- include/grpc/support/avl.h - include/grpc/support/avl.h
- include/grpc/support/cmdline.h - include/grpc/support/cmdline.h
- include/grpc/support/cpu.h - include/grpc/support/cpu.h
- include/grpc/support/histogram.h - include/grpc/support/histogram.h
- include/grpc/support/host_port.h - include/grpc/support/host_port.h
- include/grpc/support/log.h - include/grpc/support/log.h
- include/grpc/support/log_win32.h - include/grpc/support/log_windows.h
- include/grpc/support/port_platform.h - include/grpc/support/port_platform.h
- include/grpc/support/slice.h - include/grpc/support/slice.h
- include/grpc/support/slice_buffer.h - include/grpc/support/slice_buffer.h
@ -57,7 +57,7 @@ filegroups:
- include/grpc/support/sync.h - include/grpc/support/sync.h
- include/grpc/support/sync_generic.h - include/grpc/support/sync_generic.h
- include/grpc/support/sync_posix.h - include/grpc/support/sync_posix.h
- include/grpc/support/sync_win32.h - include/grpc/support/sync_windows.h
- include/grpc/support/thd.h - include/grpc/support/thd.h
- include/grpc/support/time.h - include/grpc/support/time.h
- include/grpc/support/tls.h - include/grpc/support/tls.h
@ -74,7 +74,7 @@ filegroups:
- src/core/lib/support/murmur_hash.h - src/core/lib/support/murmur_hash.h
- src/core/lib/support/stack_lockfree.h - src/core/lib/support/stack_lockfree.h
- src/core/lib/support/string.h - src/core/lib/support/string.h
- src/core/lib/support/string_win32.h - src/core/lib/support/string_windows.h
- src/core/lib/support/thd_internal.h - src/core/lib/support/thd_internal.h
- src/core/lib/support/time_precise.h - src/core/lib/support/time_precise.h
- src/core/lib/support/tmpfile.h - src/core/lib/support/tmpfile.h
@ -91,7 +91,7 @@ filegroups:
- src/core/lib/support/cpu_windows.c - src/core/lib/support/cpu_windows.c
- src/core/lib/support/env_linux.c - src/core/lib/support/env_linux.c
- src/core/lib/support/env_posix.c - src/core/lib/support/env_posix.c
- src/core/lib/support/env_win32.c - src/core/lib/support/env_windows.c
- src/core/lib/support/histogram.c - src/core/lib/support/histogram.c
- src/core/lib/support/host_port.c - src/core/lib/support/host_port.c
- src/core/lib/support/load_file.c - src/core/lib/support/load_file.c
@ -99,31 +99,31 @@ filegroups:
- src/core/lib/support/log_android.c - src/core/lib/support/log_android.c
- src/core/lib/support/log_linux.c - src/core/lib/support/log_linux.c
- src/core/lib/support/log_posix.c - src/core/lib/support/log_posix.c
- src/core/lib/support/log_win32.c - src/core/lib/support/log_windows.c
- src/core/lib/support/murmur_hash.c - src/core/lib/support/murmur_hash.c
- src/core/lib/support/slice.c - src/core/lib/support/slice.c
- src/core/lib/support/slice_buffer.c - src/core/lib/support/slice_buffer.c
- src/core/lib/support/stack_lockfree.c - src/core/lib/support/stack_lockfree.c
- src/core/lib/support/string.c - src/core/lib/support/string.c
- src/core/lib/support/string_posix.c - src/core/lib/support/string_posix.c
- src/core/lib/support/string_util_win32.c - src/core/lib/support/string_util_windows.c
- src/core/lib/support/string_win32.c - src/core/lib/support/string_windows.c
- src/core/lib/support/subprocess_posix.c - src/core/lib/support/subprocess_posix.c
- src/core/lib/support/subprocess_windows.c - src/core/lib/support/subprocess_windows.c
- src/core/lib/support/sync.c - src/core/lib/support/sync.c
- src/core/lib/support/sync_posix.c - src/core/lib/support/sync_posix.c
- src/core/lib/support/sync_win32.c - src/core/lib/support/sync_windows.c
- src/core/lib/support/thd.c - src/core/lib/support/thd.c
- src/core/lib/support/thd_posix.c - src/core/lib/support/thd_posix.c
- src/core/lib/support/thd_win32.c - src/core/lib/support/thd_windows.c
- src/core/lib/support/time.c - src/core/lib/support/time.c
- src/core/lib/support/time_posix.c - src/core/lib/support/time_posix.c
- src/core/lib/support/time_precise.c - src/core/lib/support/time_precise.c
- src/core/lib/support/time_win32.c - src/core/lib/support/time_windows.c
- src/core/lib/support/tls_pthread.c - src/core/lib/support/tls_pthread.c
- src/core/lib/support/tmpfile_msys.c - src/core/lib/support/tmpfile_msys.c
- src/core/lib/support/tmpfile_posix.c - src/core/lib/support/tmpfile_posix.c
- src/core/lib/support/tmpfile_win32.c - src/core/lib/support/tmpfile_windows.c
- src/core/lib/support/wrap_memcpy.c - src/core/lib/support/wrap_memcpy.c
uses: uses:
- gpr_codegen - gpr_codegen
@ -133,7 +133,7 @@ filegroups:
- include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_gcc_sync.h
- include/grpc/impl/codegen/atm_win32.h - include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h - include/grpc/impl/codegen/log.h
- include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/port_platform.h
- include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/slice.h
@ -141,8 +141,13 @@ filegroups:
- include/grpc/impl/codegen/sync.h - include/grpc/impl/codegen/sync.h
- include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_generic.h
- include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_posix.h
- include/grpc/impl/codegen/sync_win32.h - include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h - include/grpc/impl/codegen/time.h
- name: grpc++_codegen_base_src
src:
- src/cpp/codegen/codegen_init.cc
uses:
- grpc++_codegen_base
- name: grpc_base - name: grpc_base
public_headers: public_headers:
- include/grpc/byte_buffer.h - include/grpc/byte_buffer.h
@ -177,6 +182,7 @@ filegroups:
- src/core/lib/iomgr/iomgr.h - src/core/lib/iomgr/iomgr.h
- src/core/lib/iomgr/iomgr_internal.h - src/core/lib/iomgr/iomgr_internal.h
- src/core/lib/iomgr/iomgr_posix.h - src/core/lib/iomgr/iomgr_posix.h
- src/core/lib/iomgr/polling_entity.h
- src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset.h
- src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set.h
- src/core/lib/iomgr/pollset_set_windows.h - src/core/lib/iomgr/pollset_set_windows.h
@ -185,7 +191,7 @@ filegroups:
- src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr.h
- src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_posix.h
- src/core/lib/iomgr/sockaddr_utils.h - src/core/lib/iomgr/sockaddr_utils.h
- src/core/lib/iomgr/sockaddr_win32.h - src/core/lib/iomgr/sockaddr_windows.h
- src/core/lib/iomgr/socket_utils_posix.h - src/core/lib/iomgr/socket_utils_posix.h
- src/core/lib/iomgr/socket_windows.h - src/core/lib/iomgr/socket_windows.h
- src/core/lib/iomgr/tcp_client.h - src/core/lib/iomgr/tcp_client.h
@ -252,6 +258,7 @@ filegroups:
- src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_posix.c
@ -389,6 +396,16 @@ filegroups:
uses: uses:
- grpc_base - grpc_base
- grpc_client_config - grpc_client_config
- name: grpc_load_reporting
headers:
- src/core/ext/load_reporting/load_reporting.h
- src/core/ext/load_reporting/load_reporting_filter.h
src:
- src/core/ext/load_reporting/load_reporting.c
- src/core/ext/load_reporting/load_reporting_filter.c
plugin: grpc_load_reporting_plugin
uses:
- grpc_base
- name: grpc_resolver_dns_native - name: grpc_resolver_dns_native
src: src:
- src/core/ext/resolver/dns/native/dns_resolver.c - src/core/ext/resolver/dns/native/dns_resolver.c
@ -405,7 +422,6 @@ filegroups:
- grpc_client_config - grpc_client_config
- name: grpc_secure - name: grpc_secure
public_headers: public_headers:
- include/grpc/grpc_cronet.h
- include/grpc/grpc_security.h - include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h - include/grpc/grpc_security_constants.h
headers: headers:
@ -435,7 +451,7 @@ filegroups:
- src/core/lib/security/credentials/credentials_metadata.c - src/core/lib/security/credentials/credentials_metadata.c
- src/core/lib/security/credentials/fake/fake_credentials.c - src/core/lib/security/credentials/fake/fake_credentials.c
- src/core/lib/security/credentials/google_default/credentials_posix.c - src/core/lib/security/credentials/google_default/credentials_posix.c
- src/core/lib/security/credentials/google_default/credentials_win32.c - src/core/lib/security/credentials/google_default/credentials_windows.c
- src/core/lib/security/credentials/google_default/google_default_credentials.c - src/core/lib/security/credentials/google_default/google_default_credentials.c
- src/core/lib/security/credentials/iam/iam_credentials.c - src/core/lib/security/credentials/iam/iam_credentials.c
- src/core/lib/security/credentials/jwt/json_token.c - src/core/lib/security/credentials/jwt/json_token.c
@ -571,6 +587,10 @@ filegroups:
- grpc_base - grpc_base
- grpc_secure - grpc_secure
- name: grpc_transport_cronet_client_secure - name: grpc_transport_cronet_client_secure
public_headers:
- include/grpc/grpc_cronet.h
- include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h
headers: headers:
- third_party/objective_c/Cronet/cronet_c_for_grpc.h - third_party/objective_c/Cronet/cronet_c_for_grpc.h
src: src:
@ -619,7 +639,6 @@ filegroups:
- include/grpc++/impl/client_unary_call.h - include/grpc++/impl/client_unary_call.h
- include/grpc++/impl/grpc_library.h - include/grpc++/impl/grpc_library.h
- include/grpc++/impl/method_handler_impl.h - include/grpc++/impl/method_handler_impl.h
- include/grpc++/impl/proto_utils.h
- include/grpc++/impl/rpc_method.h - include/grpc++/impl/rpc_method.h
- include/grpc++/impl/rpc_service_method.h - include/grpc++/impl/rpc_service_method.h
- include/grpc++/impl/serialization_traits.h - include/grpc++/impl/serialization_traits.h
@ -644,6 +663,7 @@ filegroups:
- include/grpc++/support/async_unary_call.h - include/grpc++/support/async_unary_call.h
- include/grpc++/support/byte_buffer.h - include/grpc++/support/byte_buffer.h
- include/grpc++/support/channel_arguments.h - include/grpc++/support/channel_arguments.h
- include/grpc++/support/config.h
- include/grpc++/support/slice.h - include/grpc++/support/slice.h
- include/grpc++/support/status.h - include/grpc++/support/status.h
- include/grpc++/support/status_code_enum.h - include/grpc++/support/status_code_enum.h
@ -684,9 +704,8 @@ filegroups:
deps: deps:
- grpc - grpc
uses: uses:
- grpc++_codegen - grpc++_codegen_base
- grpc++_config - name: grpc++_codegen_base
- name: grpc++_codegen
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/impl/codegen/async_stream.h - include/grpc++/impl/codegen/async_stream.h
@ -698,11 +717,11 @@ filegroups:
- include/grpc++/impl/codegen/client_unary_call.h - include/grpc++/impl/codegen/client_unary_call.h
- include/grpc++/impl/codegen/completion_queue.h - include/grpc++/impl/codegen/completion_queue.h
- include/grpc++/impl/codegen/completion_queue_tag.h - include/grpc++/impl/codegen/completion_queue_tag.h
- include/grpc++/impl/codegen/config.h
- include/grpc++/impl/codegen/core_codegen_interface.h - include/grpc++/impl/codegen/core_codegen_interface.h
- include/grpc++/impl/codegen/create_auth_context.h - include/grpc++/impl/codegen/create_auth_context.h
- include/grpc++/impl/codegen/grpc_library.h - include/grpc++/impl/codegen/grpc_library.h
- include/grpc++/impl/codegen/method_handler_impl.h - include/grpc++/impl/codegen/method_handler_impl.h
- include/grpc++/impl/codegen/proto_utils.h
- include/grpc++/impl/codegen/rpc_method.h - include/grpc++/impl/codegen/rpc_method.h
- include/grpc++/impl/codegen/rpc_service_method.h - include/grpc++/impl/codegen/rpc_service_method.h
- include/grpc++/impl/codegen/security/auth_context.h - include/grpc++/impl/codegen/security/auth_context.h
@ -719,22 +738,18 @@ filegroups:
- include/grpc++/impl/codegen/sync_no_cxx11.h - include/grpc++/impl/codegen/sync_no_cxx11.h
- include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/sync_stream.h
- include/grpc++/impl/codegen/time.h - include/grpc++/impl/codegen/time.h
src:
- src/cpp/codegen/codegen_init.cc
uses: uses:
- grpc_codegen - grpc_codegen
- grpc++_config_codegen - name: grpc++_codegen_proto
- name: grpc++_config
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/support/config.h - include/grpc++/impl/codegen/proto_utils.h
- include/grpc++/support/config_protobuf.h
uses: uses:
- grpc++_config_codegen - grpc++_codegen_base
- name: grpc++_config_codegen - grpc++_config_proto
- name: grpc++_config_proto
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/impl/codegen/config.h
- include/grpc++/impl/codegen/config_protobuf.h - include/grpc++/impl/codegen/config_protobuf.h
libs: libs:
- name: gpr - name: gpr
@ -769,12 +784,12 @@ libs:
- grpc_transport_chttp2_client_secure - grpc_transport_chttp2_client_secure
- grpc_transport_chttp2_server_insecure - grpc_transport_chttp2_server_insecure
- grpc_transport_chttp2_client_insecure - grpc_transport_chttp2_client_insecure
- grpc_transport_cronet_client_secure
- grpc_lb_policy_grpclb - grpc_lb_policy_grpclb
- grpc_lb_policy_pick_first - grpc_lb_policy_pick_first
- grpc_lb_policy_round_robin - grpc_lb_policy_round_robin
- grpc_resolver_dns_native - grpc_resolver_dns_native
- grpc_resolver_sockaddr - grpc_resolver_sockaddr
- grpc_load_reporting
- grpc_secure - grpc_secure
- census - census
generate_plugin_registry: true generate_plugin_registry: true
@ -783,6 +798,22 @@ libs:
- grpc.dependencies.openssl - grpc.dependencies.openssl
- grpc.dependencies.zlib - grpc.dependencies.zlib
vs_project_guid: '{29D16885-7228-4C31-81ED-5F9187C7F2A9}' vs_project_guid: '{29D16885-7228-4C31-81ED-5F9187C7F2A9}'
- name: grpc_cronet
build: all
language: c
src:
- src/core/lib/surface/init.c
baselib: true
deps_linkage: static
dll: true
filegroups:
- grpc_base
- grpc_transport_cronet_client_secure
- grpc_transport_chttp2_client_secure
generate_plugin_registry: true
platforms:
- linux
secure: true
- name: grpc_dll - name: grpc_dll
build: private build: private
language: c language: c
@ -849,6 +880,7 @@ libs:
- grpc_transport_chttp2_client_insecure - grpc_transport_chttp2_client_insecure
- grpc_resolver_dns_native - grpc_resolver_dns_native
- grpc_resolver_sockaddr - grpc_resolver_sockaddr
- grpc_load_reporting
- grpc_lb_policy_grpclb - grpc_lb_policy_grpclb
- grpc_lb_policy_pick_first - grpc_lb_policy_pick_first
- grpc_lb_policy_round_robin - grpc_lb_policy_round_robin
@ -917,7 +949,8 @@ libs:
dll: true dll: true
filegroups: filegroups:
- grpc++_base - grpc++_base
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
secure: check secure: check
vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}'
- name: grpc++_test_config - name: grpc++_test_config
@ -933,7 +966,6 @@ libs:
headers: headers:
- test/cpp/end2end/test_service_impl.h - test/cpp/end2end/test_service_impl.h
- test/cpp/util/byte_buffer_proto_helper.h - test/cpp/util/byte_buffer_proto_helper.h
- test/cpp/util/cli_call.h
- test/cpp/util/create_test_channel.h - test/cpp/util/create_test_channel.h
- test/cpp/util/string_ref_helper.h - test/cpp/util/string_ref_helper.h
- test/cpp/util/subprocess.h - test/cpp/util/subprocess.h
@ -944,7 +976,6 @@ libs:
- src/proto/grpc/testing/duplicate/echo_duplicate.proto - src/proto/grpc/testing/duplicate/echo_duplicate.proto
- test/cpp/end2end/test_service_impl.cc - test/cpp/end2end/test_service_impl.cc
- test/cpp/util/byte_buffer_proto_helper.cc - test/cpp/util/byte_buffer_proto_helper.cc
- test/cpp/util/cli_call.cc
- test/cpp/util/create_test_channel.cc - test/cpp/util/create_test_channel.cc
- test/cpp/util/string_ref_helper.cc - test/cpp/util/string_ref_helper.cc
- test/cpp/util/subprocess.cc - test/cpp/util/subprocess.cc
@ -952,6 +983,11 @@ libs:
deps: deps:
- grpc++ - grpc++
- grpc_test_util - grpc_test_util
filegroups:
- grpc++_codegen_base
- grpc++_codegen_base_src
- grpc++_codegen_proto
- grpc++_config_proto
- name: grpc++_unsecure - name: grpc++_unsecure
build: all build: all
language: c++ language: c++
@ -964,9 +1000,22 @@ libs:
dll: true dll: true
filegroups: filegroups:
- grpc++_base - grpc++_base
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
secure: false secure: false
vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}'
- name: grpc_cli_libs
build: private
language: c++
headers:
- test/cpp/util/cli_call.h
- test/cpp/util/proto_file_parser.h
src:
- test/cpp/util/cli_call.cc
- test/cpp/util/proto_file_parser.cc
deps:
- grpc++
- grpc_plugin_support
- name: grpc_plugin_support - name: grpc_plugin_support
build: protoc build: protoc
language: c++ language: c++
@ -994,7 +1043,7 @@ libs:
- src/compiler/python_generator.cc - src/compiler/python_generator.cc
- src/compiler/ruby_generator.cc - src/compiler/ruby_generator.cc
filegroups: filegroups:
- grpc++_config - grpc++_config_proto
secure: false secure: false
vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}' vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}'
vs_props: vs_props:
@ -1071,7 +1120,6 @@ libs:
- test/cpp/qps/histogram.h - test/cpp/qps/histogram.h
- test/cpp/qps/interarrival.h - test/cpp/qps/interarrival.h
- test/cpp/qps/limit_cores.h - test/cpp/qps/limit_cores.h
- test/cpp/qps/perf_db_client.h
- test/cpp/qps/qps_worker.h - test/cpp/qps/qps_worker.h
- test/cpp/qps/report.h - test/cpp/qps/report.h
- test/cpp/qps/server.h - test/cpp/qps/server.h
@ -1084,12 +1132,10 @@ libs:
- src/proto/grpc/testing/stats.proto - src/proto/grpc/testing/stats.proto
- src/proto/grpc/testing/control.proto - src/proto/grpc/testing/control.proto
- src/proto/grpc/testing/services.proto - src/proto/grpc/testing/services.proto
- src/proto/grpc/testing/perf_db.proto
- test/cpp/qps/client_async.cc - test/cpp/qps/client_async.cc
- test/cpp/qps/client_sync.cc - test/cpp/qps/client_sync.cc
- test/cpp/qps/driver.cc - test/cpp/qps/driver.cc
- test/cpp/qps/limit_cores.cc - test/cpp/qps/limit_cores.cc
- test/cpp/qps/perf_db_client.cc
- test/cpp/qps/qps_worker.cc - test/cpp/qps/qps_worker.cc
- test/cpp/qps/report.cc - test/cpp/qps/report.cc
- test/cpp/qps/server_async.cc - test/cpp/qps/server_async.cc
@ -2389,6 +2435,7 @@ targets:
src: src:
- test/cpp/util/cli_call_test.cc - test/cpp/util/cli_call_test.cc
deps: deps:
- grpc_cli_libs
- grpc++_test_util - grpc++_test_util
- grpc_test_util - grpc_test_util
- grpc++ - grpc++
@ -2434,7 +2481,6 @@ targets:
- src/proto/grpc/testing/control.proto - src/proto/grpc/testing/control.proto
- src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/messages.proto
- src/proto/grpc/testing/payloads.proto - src/proto/grpc/testing/payloads.proto
- src/proto/grpc/testing/perf_db.proto
- src/proto/grpc/testing/services.proto - src/proto/grpc/testing/services.proto
- src/proto/grpc/testing/stats.proto - src/proto/grpc/testing/stats.proto
- test/cpp/codegen/codegen_test_full.cc - test/cpp/codegen/codegen_test_full.cc
@ -2443,7 +2489,7 @@ targets:
- grpc - grpc
- gpr - gpr
filegroups: filegroups:
- grpc++_codegen - grpc++_codegen_base
- name: codegen_test_minimal - name: codegen_test_minimal
gtest: true gtest: true
build: test build: test
@ -2452,12 +2498,12 @@ targets:
- src/proto/grpc/testing/control.proto - src/proto/grpc/testing/control.proto
- src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/messages.proto
- src/proto/grpc/testing/payloads.proto - src/proto/grpc/testing/payloads.proto
- src/proto/grpc/testing/perf_db.proto
- src/proto/grpc/testing/services.proto - src/proto/grpc/testing/services.proto
- src/proto/grpc/testing/stats.proto - src/proto/grpc/testing/stats.proto
- test/cpp/codegen/codegen_test_minimal.cc - test/cpp/codegen/codegen_test_minimal.cc
filegroups: filegroups:
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
- name: credentials_test - name: credentials_test
gtest: true gtest: true
build: test build: test
@ -2557,6 +2603,7 @@ targets:
src: src:
- test/cpp/util/grpc_cli.cc - test/cpp/util/grpc_cli.cc
deps: deps:
- grpc_cli_libs
- grpc++_test_util - grpc++_test_util
- grpc_test_util - grpc_test_util
- grpc++ - grpc++

@ -48,7 +48,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/cpu_windows.c \ src/core/lib/support/cpu_windows.c \
src/core/lib/support/env_linux.c \ src/core/lib/support/env_linux.c \
src/core/lib/support/env_posix.c \ src/core/lib/support/env_posix.c \
src/core/lib/support/env_win32.c \ src/core/lib/support/env_windows.c \
src/core/lib/support/histogram.c \ src/core/lib/support/histogram.c \
src/core/lib/support/host_port.c \ src/core/lib/support/host_port.c \
src/core/lib/support/load_file.c \ src/core/lib/support/load_file.c \
@ -56,31 +56,31 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/log_android.c \ src/core/lib/support/log_android.c \
src/core/lib/support/log_linux.c \ src/core/lib/support/log_linux.c \
src/core/lib/support/log_posix.c \ src/core/lib/support/log_posix.c \
src/core/lib/support/log_win32.c \ src/core/lib/support/log_windows.c \
src/core/lib/support/murmur_hash.c \ src/core/lib/support/murmur_hash.c \
src/core/lib/support/slice.c \ src/core/lib/support/slice.c \
src/core/lib/support/slice_buffer.c \ src/core/lib/support/slice_buffer.c \
src/core/lib/support/stack_lockfree.c \ src/core/lib/support/stack_lockfree.c \
src/core/lib/support/string.c \ src/core/lib/support/string.c \
src/core/lib/support/string_posix.c \ src/core/lib/support/string_posix.c \
src/core/lib/support/string_util_win32.c \ src/core/lib/support/string_util_windows.c \
src/core/lib/support/string_win32.c \ src/core/lib/support/string_windows.c \
src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_posix.c \
src/core/lib/support/subprocess_windows.c \ src/core/lib/support/subprocess_windows.c \
src/core/lib/support/sync.c \ src/core/lib/support/sync.c \
src/core/lib/support/sync_posix.c \ src/core/lib/support/sync_posix.c \
src/core/lib/support/sync_win32.c \ src/core/lib/support/sync_windows.c \
src/core/lib/support/thd.c \ src/core/lib/support/thd.c \
src/core/lib/support/thd_posix.c \ src/core/lib/support/thd_posix.c \
src/core/lib/support/thd_win32.c \ src/core/lib/support/thd_windows.c \
src/core/lib/support/time.c \ src/core/lib/support/time.c \
src/core/lib/support/time_posix.c \ src/core/lib/support/time_posix.c \
src/core/lib/support/time_precise.c \ src/core/lib/support/time_precise.c \
src/core/lib/support/time_win32.c \ src/core/lib/support/time_windows.c \
src/core/lib/support/tls_pthread.c \ src/core/lib/support/tls_pthread.c \
src/core/lib/support/tmpfile_msys.c \ src/core/lib/support/tmpfile_msys.c \
src/core/lib/support/tmpfile_posix.c \ src/core/lib/support/tmpfile_posix.c \
src/core/lib/support/tmpfile_win32.c \ src/core/lib/support/tmpfile_windows.c \
src/core/lib/support/wrap_memcpy.c \ src/core/lib/support/wrap_memcpy.c \
src/core/lib/surface/init.c \ src/core/lib/surface/init.c \
src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_args.c \
@ -109,6 +109,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/iomgr.c \ src/core/lib/iomgr/iomgr.c \
src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_posix.c \
src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/iomgr_windows.c \
src/core/lib/iomgr/polling_entity.c \
src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \
src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/pollset_windows.c \
src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_posix.c \
@ -195,7 +196,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/security/credentials/credentials_metadata.c \ src/core/lib/security/credentials/credentials_metadata.c \
src/core/lib/security/credentials/fake/fake_credentials.c \ src/core/lib/security/credentials/fake/fake_credentials.c \
src/core/lib/security/credentials/google_default/credentials_posix.c \ src/core/lib/security/credentials/google_default/credentials_posix.c \
src/core/lib/security/credentials/google_default/credentials_win32.c \ src/core/lib/security/credentials/google_default/credentials_windows.c \
src/core/lib/security/credentials/google_default/google_default_credentials.c \ src/core/lib/security/credentials/google_default/google_default_credentials.c \
src/core/lib/security/credentials/iam/iam_credentials.c \ src/core/lib/security/credentials/iam/iam_credentials.c \
src/core/lib/security/credentials/jwt/json_token.c \ src/core/lib/security/credentials/jwt/json_token.c \
@ -237,9 +238,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/client_config/uri_parser.c \ src/core/ext/client_config/uri_parser.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \
src/core/ext/transport/cronet/transport/cronet_api_dummy.c \
src/core/ext/transport/cronet/transport/cronet_transport.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \ third_party/nanopb/pb_common.c \
@ -249,6 +247,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/dns/native/dns_resolver.c \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/load_reporting/load_reporting.c \
src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/census/context.c \ src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \ src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \ src/core/ext/census/grpc_context.c \
@ -572,6 +572,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/load_reporting)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/sockaddr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn)
@ -580,8 +581,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/client/secure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug)

@ -1,5 +1,35 @@
// GENERATED CODE -- DO NOT EDIT! // GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
'use strict'; 'use strict';
var grpc = require('grpc'); var grpc = require('grpc');
var helloworld_pb = require('./helloworld_pb.js'); var helloworld_pb = require('./helloworld_pb.js');
@ -27,7 +57,9 @@ function deserialize_HelloRequest(buffer_arg) {
} }
// The greeting service definition.
var GreeterService = exports.GreeterService = { var GreeterService = exports.GreeterService = {
// Sends a greeting
sayHello: { sayHello: {
path: '/helloworld.Greeter/SayHello', path: '/helloworld.Greeter/SayHello',
requestStream: false, requestStream: false,

@ -61,7 +61,7 @@ proto.helloworld.HelloRequest.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };
@ -220,7 +220,7 @@ proto.helloworld.HelloReply.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };

@ -1,5 +1,35 @@
// GENERATED CODE -- DO NOT EDIT! // GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
'use strict'; 'use strict';
var grpc = require('grpc'); var grpc = require('grpc');
var route_guide_pb = require('./route_guide_pb.js'); var route_guide_pb = require('./route_guide_pb.js');
@ -60,7 +90,14 @@ function deserialize_RouteSummary(buffer_arg) {
} }
// Interface exported by the server.
var RouteGuideService = exports.RouteGuideService = { var RouteGuideService = exports.RouteGuideService = {
// A simple RPC.
//
// Obtains the feature at a given position.
//
// A feature with an empty name is returned if there's no feature at the given
// position.
getFeature: { getFeature: {
path: '/routeguide.RouteGuide/GetFeature', path: '/routeguide.RouteGuide/GetFeature',
requestStream: false, requestStream: false,
@ -72,6 +109,12 @@ var RouteGuideService = exports.RouteGuideService = {
responseSerialize: serialize_Feature, responseSerialize: serialize_Feature,
responseDeserialize: deserialize_Feature, responseDeserialize: deserialize_Feature,
}, },
// A server-to-client streaming RPC.
//
// Obtains the Features available within the given Rectangle. Results are
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
listFeatures: { listFeatures: {
path: '/routeguide.RouteGuide/ListFeatures', path: '/routeguide.RouteGuide/ListFeatures',
requestStream: false, requestStream: false,
@ -83,6 +126,10 @@ var RouteGuideService = exports.RouteGuideService = {
responseSerialize: serialize_Feature, responseSerialize: serialize_Feature,
responseDeserialize: deserialize_Feature, responseDeserialize: deserialize_Feature,
}, },
// A client-to-server streaming RPC.
//
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
recordRoute: { recordRoute: {
path: '/routeguide.RouteGuide/RecordRoute', path: '/routeguide.RouteGuide/RecordRoute',
requestStream: true, requestStream: true,
@ -94,6 +141,10 @@ var RouteGuideService = exports.RouteGuideService = {
responseSerialize: serialize_RouteSummary, responseSerialize: serialize_RouteSummary,
responseDeserialize: deserialize_RouteSummary, responseDeserialize: deserialize_RouteSummary,
}, },
// A Bidirectional streaming RPC.
//
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
routeChat: { routeChat: {
path: '/routeguide.RouteGuide/RouteChat', path: '/routeguide.RouteGuide/RouteChat',
requestStream: true, requestStream: true,

@ -65,7 +65,7 @@ proto.routeguide.Point.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };
@ -251,7 +251,7 @@ proto.routeguide.Rectangle.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };
@ -453,7 +453,7 @@ proto.routeguide.Feature.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };
@ -647,7 +647,7 @@ proto.routeguide.RouteNote.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };
@ -843,7 +843,7 @@ proto.routeguide.RouteSummary.toObject = function(includeInstance, msg) {
}; };
if (includeInstance) { if (includeInstance) {
obj.$jspbMessageInstance = msg obj.$jspbMessageInstance = msg;
} }
return obj; return obj;
}; };

@ -1,13 +1,42 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: helloworld.proto for package 'helloworld' # Source: helloworld.proto for package 'helloworld'
# Original file comments:
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
require 'grpc' require 'grpc'
require 'helloworld' require 'helloworld'
module Helloworld module Helloworld
module Greeter module Greeter
# The greeting service definition.
# TODO: add proto service documentation here
class Service class Service
include GRPC::GenericService include GRPC::GenericService
@ -16,6 +45,7 @@ module Helloworld
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
self.service_name = 'helloworld.Greeter' self.service_name = 'helloworld.Greeter'
# Sends a greeting
rpc :SayHello, HelloRequest, HelloReply rpc :SayHello, HelloRequest, HelloReply
end end

@ -1,13 +1,42 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: route_guide.proto for package 'routeguide' # Source: route_guide.proto for package 'routeguide'
# Original file comments:
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
require 'grpc' require 'grpc'
require 'route_guide' require 'route_guide'
module Routeguide module Routeguide
module RouteGuide module RouteGuide
# Interface exported by the server.
# TODO: add proto service documentation here
class Service class Service
include GRPC::GenericService include GRPC::GenericService
@ -16,9 +45,29 @@ module Routeguide
self.unmarshal_class_method = :decode self.unmarshal_class_method = :decode
self.service_name = 'routeguide.RouteGuide' self.service_name = 'routeguide.RouteGuide'
# A simple RPC.
#
# Obtains the feature at a given position.
#
# A feature with an empty name is returned if there's no feature at the given
# position.
rpc :GetFeature, Point, Feature rpc :GetFeature, Point, Feature
# A server-to-client streaming RPC.
#
# Obtains the Features available within the given Rectangle. Results are
# streamed rather than returned at once (e.g. in a response message with a
# repeated field), as the rectangle may cover a large area and contain a
# huge number of features.
rpc :ListFeatures, Rectangle, stream(Feature) rpc :ListFeatures, Rectangle, stream(Feature)
# A client-to-server streaming RPC.
#
# Accepts a stream of Points on a route being traversed, returning a
# RouteSummary when traversal is completed.
rpc :RecordRoute, stream(Point), RouteSummary rpc :RecordRoute, stream(Point), RouteSummary
# A Bidirectional streaming RPC.
#
# Accepts a stream of RouteNotes sent while a route is being traversed,
# while receiving other RouteNotes (e.g. from other users).
rpc :RouteChat, stream(RouteNote), stream(RouteNote) rpc :RouteChat, stream(RouteNote), stream(RouteNote)
end end

@ -72,7 +72,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
'src/core/lib/support/string_win32.h', 'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h', 'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h', 'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h', 'src/core/lib/support/tmpfile.h',
@ -80,14 +80,14 @@ Pod::Spec.new do |s|
'include/grpc/support/atm.h', 'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h', 'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_win32.h', 'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h', 'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h', 'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h', 'include/grpc/support/cpu.h',
'include/grpc/support/histogram.h', 'include/grpc/support/histogram.h',
'include/grpc/support/host_port.h', 'include/grpc/support/host_port.h',
'include/grpc/support/log.h', 'include/grpc/support/log.h',
'include/grpc/support/log_win32.h', 'include/grpc/support/log_windows.h',
'include/grpc/support/port_platform.h', 'include/grpc/support/port_platform.h',
'include/grpc/support/slice.h', 'include/grpc/support/slice.h',
'include/grpc/support/slice_buffer.h', 'include/grpc/support/slice_buffer.h',
@ -96,7 +96,7 @@ Pod::Spec.new do |s|
'include/grpc/support/sync.h', 'include/grpc/support/sync.h',
'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h', 'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_win32.h', 'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h', 'include/grpc/support/thd.h',
'include/grpc/support/time.h', 'include/grpc/support/time.h',
'include/grpc/support/tls.h', 'include/grpc/support/tls.h',
@ -108,7 +108,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_win32.h', 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h', 'include/grpc/impl/codegen/slice.h',
@ -116,7 +116,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/time.h', 'include/grpc/impl/codegen/time.h',
'src/core/lib/profiling/basic_timers.c', 'src/core/lib/profiling/basic_timers.c',
'src/core/lib/profiling/stap_timers.c', 'src/core/lib/profiling/stap_timers.c',
@ -130,7 +130,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/cpu_windows.c',
'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_linux.c',
'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_posix.c',
'src/core/lib/support/env_win32.c', 'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.c', 'src/core/lib/support/histogram.c',
'src/core/lib/support/host_port.c', 'src/core/lib/support/host_port.c',
'src/core/lib/support/load_file.c', 'src/core/lib/support/load_file.c',
@ -138,31 +138,31 @@ Pod::Spec.new do |s|
'src/core/lib/support/log_android.c', 'src/core/lib/support/log_android.c',
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c', 'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_win32.c', 'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/slice.c', 'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/stack_lockfree.c',
'src/core/lib/support/string.c', 'src/core/lib/support/string.c',
'src/core/lib/support/string_posix.c', 'src/core/lib/support/string_posix.c',
'src/core/lib/support/string_util_win32.c', 'src/core/lib/support/string_util_windows.c',
'src/core/lib/support/string_win32.c', 'src/core/lib/support/string_windows.c',
'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_posix.c',
'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/subprocess_windows.c',
'src/core/lib/support/sync.c', 'src/core/lib/support/sync.c',
'src/core/lib/support/sync_posix.c', 'src/core/lib/support/sync_posix.c',
'src/core/lib/support/sync_win32.c', 'src/core/lib/support/sync_windows.c',
'src/core/lib/support/thd.c', 'src/core/lib/support/thd.c',
'src/core/lib/support/thd_posix.c', 'src/core/lib/support/thd_posix.c',
'src/core/lib/support/thd_win32.c', 'src/core/lib/support/thd_windows.c',
'src/core/lib/support/time.c', 'src/core/lib/support/time.c',
'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_posix.c',
'src/core/lib/support/time_precise.c', 'src/core/lib/support/time_precise.c',
'src/core/lib/support/time_win32.c', 'src/core/lib/support/time_windows.c',
'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tls_pthread.c',
'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_msys.c',
'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/tmpfile_windows.c',
'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/support/wrap_memcpy.c',
'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_args.h',
'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack.h',
@ -190,6 +190,7 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set.h',
'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_set_windows.h',
@ -198,7 +199,7 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr.h',
'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_win32.h', 'src/core/lib/iomgr/sockaddr_windows.h',
'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_utils_posix.h',
'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/socket_windows.h',
'src/core/lib/iomgr/tcp_client.h', 'src/core/lib/iomgr/tcp_client.h',
@ -298,13 +299,14 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h', 'src/core/ext/client_config/uri_parser.h',
'third_party/objective_c/Cronet/cronet_c_for_grpc.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h', 'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h', 'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h', 'src/core/ext/census/aggregation.h',
'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/census_rpc_stats.h',
@ -328,7 +330,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_win32.h', 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h', 'include/grpc/impl/codegen/slice.h',
@ -336,9 +338,8 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/time.h', 'include/grpc/impl/codegen/time.h',
'include/grpc/grpc_cronet.h',
'include/grpc/grpc_security.h', 'include/grpc/grpc_security.h',
'include/grpc/grpc_security_constants.h', 'include/grpc/grpc_security_constants.h',
'include/grpc/census.h', 'include/grpc/census.h',
@ -369,6 +370,7 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.c', 'src/core/lib/iomgr/iomgr.c',
'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_posix.c',
'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/iomgr_windows.c',
'src/core/lib/iomgr/polling_entity.c',
'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c',
'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/pollset_windows.c',
'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_posix.c',
@ -455,7 +457,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/credentials/credentials_metadata.c', 'src/core/lib/security/credentials/credentials_metadata.c',
'src/core/lib/security/credentials/fake/fake_credentials.c', 'src/core/lib/security/credentials/fake/fake_credentials.c',
'src/core/lib/security/credentials/google_default/credentials_posix.c', 'src/core/lib/security/credentials/google_default/credentials_posix.c',
'src/core/lib/security/credentials/google_default/credentials_win32.c', 'src/core/lib/security/credentials/google_default/credentials_windows.c',
'src/core/lib/security/credentials/google_default/google_default_credentials.c', 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
'src/core/lib/security/credentials/iam/iam_credentials.c', 'src/core/lib/security/credentials/iam/iam_credentials.c',
'src/core/lib/security/credentials/jwt/json_token.c', 'src/core/lib/security/credentials/jwt/json_token.c',
@ -497,9 +499,6 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/uri_parser.c', 'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
'src/core/ext/transport/cronet/transport/cronet_api_dummy.c',
'src/core/ext/transport/cronet/transport/cronet_transport.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_common.c',
@ -509,6 +508,8 @@ Pod::Spec.new do |s|
'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/census/context.c', 'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_context.c',
@ -529,7 +530,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
'src/core/lib/support/string_win32.h', 'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h', 'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h', 'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h', 'src/core/lib/support/tmpfile.h',
@ -559,6 +560,7 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set.h',
'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_set_windows.h',
@ -567,7 +569,7 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr.h',
'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_win32.h', 'src/core/lib/iomgr/sockaddr_windows.h',
'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_utils_posix.h',
'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/socket_windows.h',
'src/core/lib/iomgr/tcp_client.h', 'src/core/lib/iomgr/tcp_client.h',
@ -667,13 +669,14 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h', 'src/core/ext/client_config/uri_parser.h',
'third_party/objective_c/Cronet/cronet_c_for_grpc.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h', 'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h', 'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h', 'src/core/ext/census/aggregation.h',
'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/census_rpc_stats.h',

@ -88,7 +88,6 @@ EXPORTS
grpc_header_nonbin_value_is_legal grpc_header_nonbin_value_is_legal
grpc_is_binary_header grpc_is_binary_header
grpc_call_error_to_string grpc_call_error_to_string
grpc_cronet_secure_channel_create
grpc_auth_property_iterator_next grpc_auth_property_iterator_next
grpc_auth_context_property_iterator grpc_auth_context_property_iterator
grpc_auth_context_peer_identity grpc_auth_context_peer_identity

@ -47,14 +47,14 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/atm.h ) s.files += %w( include/grpc/support/atm.h )
s.files += %w( include/grpc/support/atm_gcc_atomic.h ) s.files += %w( include/grpc/support/atm_gcc_atomic.h )
s.files += %w( include/grpc/support/atm_gcc_sync.h ) s.files += %w( include/grpc/support/atm_gcc_sync.h )
s.files += %w( include/grpc/support/atm_win32.h ) s.files += %w( include/grpc/support/atm_windows.h )
s.files += %w( include/grpc/support/avl.h ) s.files += %w( include/grpc/support/avl.h )
s.files += %w( include/grpc/support/cmdline.h ) s.files += %w( include/grpc/support/cmdline.h )
s.files += %w( include/grpc/support/cpu.h ) s.files += %w( include/grpc/support/cpu.h )
s.files += %w( include/grpc/support/histogram.h ) s.files += %w( include/grpc/support/histogram.h )
s.files += %w( include/grpc/support/host_port.h ) s.files += %w( include/grpc/support/host_port.h )
s.files += %w( include/grpc/support/log.h ) s.files += %w( include/grpc/support/log.h )
s.files += %w( include/grpc/support/log_win32.h ) s.files += %w( include/grpc/support/log_windows.h )
s.files += %w( include/grpc/support/port_platform.h ) s.files += %w( include/grpc/support/port_platform.h )
s.files += %w( include/grpc/support/slice.h ) s.files += %w( include/grpc/support/slice.h )
s.files += %w( include/grpc/support/slice_buffer.h ) s.files += %w( include/grpc/support/slice_buffer.h )
@ -63,7 +63,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/sync.h ) s.files += %w( include/grpc/support/sync.h )
s.files += %w( include/grpc/support/sync_generic.h ) s.files += %w( include/grpc/support/sync_generic.h )
s.files += %w( include/grpc/support/sync_posix.h ) s.files += %w( include/grpc/support/sync_posix.h )
s.files += %w( include/grpc/support/sync_win32.h ) s.files += %w( include/grpc/support/sync_windows.h )
s.files += %w( include/grpc/support/thd.h ) s.files += %w( include/grpc/support/thd.h )
s.files += %w( include/grpc/support/time.h ) s.files += %w( include/grpc/support/time.h )
s.files += %w( include/grpc/support/tls.h ) s.files += %w( include/grpc/support/tls.h )
@ -75,7 +75,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_win32.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h )
s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/log.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h ) s.files += %w( include/grpc/impl/codegen/slice.h )
@ -83,7 +83,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/sync_windows.h )
s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( src/core/lib/profiling/timers.h ) s.files += %w( src/core/lib/profiling/timers.h )
s.files += %w( src/core/lib/support/backoff.h ) s.files += %w( src/core/lib/support/backoff.h )
@ -93,7 +93,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/murmur_hash.h ) s.files += %w( src/core/lib/support/murmur_hash.h )
s.files += %w( src/core/lib/support/stack_lockfree.h ) s.files += %w( src/core/lib/support/stack_lockfree.h )
s.files += %w( src/core/lib/support/string.h ) s.files += %w( src/core/lib/support/string.h )
s.files += %w( src/core/lib/support/string_win32.h ) s.files += %w( src/core/lib/support/string_windows.h )
s.files += %w( src/core/lib/support/thd_internal.h ) s.files += %w( src/core/lib/support/thd_internal.h )
s.files += %w( src/core/lib/support/time_precise.h ) s.files += %w( src/core/lib/support/time_precise.h )
s.files += %w( src/core/lib/support/tmpfile.h ) s.files += %w( src/core/lib/support/tmpfile.h )
@ -109,7 +109,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/cpu_windows.c ) s.files += %w( src/core/lib/support/cpu_windows.c )
s.files += %w( src/core/lib/support/env_linux.c ) s.files += %w( src/core/lib/support/env_linux.c )
s.files += %w( src/core/lib/support/env_posix.c ) s.files += %w( src/core/lib/support/env_posix.c )
s.files += %w( src/core/lib/support/env_win32.c ) s.files += %w( src/core/lib/support/env_windows.c )
s.files += %w( src/core/lib/support/histogram.c ) s.files += %w( src/core/lib/support/histogram.c )
s.files += %w( src/core/lib/support/host_port.c ) s.files += %w( src/core/lib/support/host_port.c )
s.files += %w( src/core/lib/support/load_file.c ) s.files += %w( src/core/lib/support/load_file.c )
@ -117,31 +117,31 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/log_android.c ) s.files += %w( src/core/lib/support/log_android.c )
s.files += %w( src/core/lib/support/log_linux.c ) s.files += %w( src/core/lib/support/log_linux.c )
s.files += %w( src/core/lib/support/log_posix.c ) s.files += %w( src/core/lib/support/log_posix.c )
s.files += %w( src/core/lib/support/log_win32.c ) s.files += %w( src/core/lib/support/log_windows.c )
s.files += %w( src/core/lib/support/murmur_hash.c ) s.files += %w( src/core/lib/support/murmur_hash.c )
s.files += %w( src/core/lib/support/slice.c ) s.files += %w( src/core/lib/support/slice.c )
s.files += %w( src/core/lib/support/slice_buffer.c ) s.files += %w( src/core/lib/support/slice_buffer.c )
s.files += %w( src/core/lib/support/stack_lockfree.c ) s.files += %w( src/core/lib/support/stack_lockfree.c )
s.files += %w( src/core/lib/support/string.c ) s.files += %w( src/core/lib/support/string.c )
s.files += %w( src/core/lib/support/string_posix.c ) s.files += %w( src/core/lib/support/string_posix.c )
s.files += %w( src/core/lib/support/string_util_win32.c ) s.files += %w( src/core/lib/support/string_util_windows.c )
s.files += %w( src/core/lib/support/string_win32.c ) s.files += %w( src/core/lib/support/string_windows.c )
s.files += %w( src/core/lib/support/subprocess_posix.c ) s.files += %w( src/core/lib/support/subprocess_posix.c )
s.files += %w( src/core/lib/support/subprocess_windows.c ) s.files += %w( src/core/lib/support/subprocess_windows.c )
s.files += %w( src/core/lib/support/sync.c ) s.files += %w( src/core/lib/support/sync.c )
s.files += %w( src/core/lib/support/sync_posix.c ) s.files += %w( src/core/lib/support/sync_posix.c )
s.files += %w( src/core/lib/support/sync_win32.c ) s.files += %w( src/core/lib/support/sync_windows.c )
s.files += %w( src/core/lib/support/thd.c ) s.files += %w( src/core/lib/support/thd.c )
s.files += %w( src/core/lib/support/thd_posix.c ) s.files += %w( src/core/lib/support/thd_posix.c )
s.files += %w( src/core/lib/support/thd_win32.c ) s.files += %w( src/core/lib/support/thd_windows.c )
s.files += %w( src/core/lib/support/time.c ) s.files += %w( src/core/lib/support/time.c )
s.files += %w( src/core/lib/support/time_posix.c ) s.files += %w( src/core/lib/support/time_posix.c )
s.files += %w( src/core/lib/support/time_precise.c ) s.files += %w( src/core/lib/support/time_precise.c )
s.files += %w( src/core/lib/support/time_win32.c ) s.files += %w( src/core/lib/support/time_windows.c )
s.files += %w( src/core/lib/support/tls_pthread.c ) s.files += %w( src/core/lib/support/tls_pthread.c )
s.files += %w( src/core/lib/support/tmpfile_msys.c ) s.files += %w( src/core/lib/support/tmpfile_msys.c )
s.files += %w( src/core/lib/support/tmpfile_posix.c ) s.files += %w( src/core/lib/support/tmpfile_posix.c )
s.files += %w( src/core/lib/support/tmpfile_win32.c ) s.files += %w( src/core/lib/support/tmpfile_windows.c )
s.files += %w( src/core/lib/support/wrap_memcpy.c ) s.files += %w( src/core/lib/support/wrap_memcpy.c )
s.files += %w( include/grpc/byte_buffer.h ) s.files += %w( include/grpc/byte_buffer.h )
s.files += %w( include/grpc/byte_buffer_reader.h ) s.files += %w( include/grpc/byte_buffer_reader.h )
@ -159,7 +159,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_win32.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h )
s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/log.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h ) s.files += %w( include/grpc/impl/codegen/slice.h )
@ -167,9 +167,8 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/sync_windows.h )
s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( include/grpc/grpc_cronet.h )
s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security.h )
s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/grpc_security_constants.h )
s.files += %w( include/grpc/census.h ) s.files += %w( include/grpc/census.h )
@ -199,6 +198,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/iomgr.h ) s.files += %w( src/core/lib/iomgr/iomgr.h )
s.files += %w( src/core/lib/iomgr/iomgr_internal.h ) s.files += %w( src/core/lib/iomgr/iomgr_internal.h )
s.files += %w( src/core/lib/iomgr/iomgr_posix.h ) s.files += %w( src/core/lib/iomgr/iomgr_posix.h )
s.files += %w( src/core/lib/iomgr/polling_entity.h )
s.files += %w( src/core/lib/iomgr/pollset.h ) s.files += %w( src/core/lib/iomgr/pollset.h )
s.files += %w( src/core/lib/iomgr/pollset_set.h ) s.files += %w( src/core/lib/iomgr/pollset_set.h )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.h )
@ -207,7 +207,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr.h )
s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h )
s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.h )
s.files += %w( src/core/lib/iomgr/sockaddr_win32.h ) s.files += %w( src/core/lib/iomgr/sockaddr_windows.h )
s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.h )
s.files += %w( src/core/lib/iomgr/socket_windows.h ) s.files += %w( src/core/lib/iomgr/socket_windows.h )
s.files += %w( src/core/lib/iomgr/tcp_client.h ) s.files += %w( src/core/lib/iomgr/tcp_client.h )
@ -307,13 +307,14 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_call_holder.h )
s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h )
s.files += %w( src/core/ext/client_config/uri_parser.h ) s.files += %w( src/core/ext/client_config/uri_parser.h )
s.files += %w( third_party/objective_c/Cronet/cronet_c_for_grpc.h )
s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h )
s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h )
s.files += %w( third_party/nanopb/pb.h ) s.files += %w( third_party/nanopb/pb.h )
s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_common.h )
s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_decode.h )
s.files += %w( third_party/nanopb/pb_encode.h ) s.files += %w( third_party/nanopb/pb_encode.h )
s.files += %w( src/core/ext/load_reporting/load_reporting.h )
s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h )
s.files += %w( src/core/ext/census/aggregation.h ) s.files += %w( src/core/ext/census/aggregation.h )
s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_interface.h )
s.files += %w( src/core/ext/census/census_rpc_stats.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h )
@ -348,6 +349,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/iomgr.c ) s.files += %w( src/core/lib/iomgr/iomgr.c )
s.files += %w( src/core/lib/iomgr/iomgr_posix.c ) s.files += %w( src/core/lib/iomgr/iomgr_posix.c )
s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) s.files += %w( src/core/lib/iomgr/iomgr_windows.c )
s.files += %w( src/core/lib/iomgr/polling_entity.c )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.c )
s.files += %w( src/core/lib/iomgr/pollset_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_windows.c )
s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) s.files += %w( src/core/lib/iomgr/resolve_address_posix.c )
@ -434,7 +436,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/credentials/credentials_metadata.c ) s.files += %w( src/core/lib/security/credentials/credentials_metadata.c )
s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.c ) s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.c )
s.files += %w( src/core/lib/security/credentials/google_default/credentials_posix.c ) s.files += %w( src/core/lib/security/credentials/google_default/credentials_posix.c )
s.files += %w( src/core/lib/security/credentials/google_default/credentials_win32.c ) s.files += %w( src/core/lib/security/credentials/google_default/credentials_windows.c )
s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.c ) s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.c )
s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.c ) s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.c )
s.files += %w( src/core/lib/security/credentials/jwt/json_token.c ) s.files += %w( src/core/lib/security/credentials/jwt/json_token.c )
@ -476,9 +478,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/client_config/uri_parser.c )
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c )
s.files += %w( src/core/ext/transport/cronet/client/secure/cronet_channel_create.c )
s.files += %w( src/core/ext/transport/cronet/transport/cronet_api_dummy.c )
s.files += %w( src/core/ext/transport/cronet/transport/cronet_transport.c )
s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c )
s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_common.c )
@ -488,6 +487,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c )
s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c )
s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c ) s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c )
s.files += %w( src/core/ext/load_reporting/load_reporting.c )
s.files += %w( src/core/ext/load_reporting/load_reporting_filter.c )
s.files += %w( src/core/ext/census/context.c ) s.files += %w( src/core/ext/census/context.c )
s.files += %w( src/core/ext/census/gen/census.pb.c ) s.files += %w( src/core/ext/census/gen/census.pb.c )
s.files += %w( src/core/ext/census/grpc_context.c ) s.files += %w( src/core/ext/census/grpc_context.c )

@ -172,6 +172,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
R* response, void* tag) R* response, void* tag)
: context_(context), call_(channel->CreateCall(method, context, cq)) { : context_(context), call_(channel->CreateCall(method, context, cq)) {
finish_ops_.RecvMessage(response); finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();
init_ops_.set_output_tag(tag); init_ops_.set_output_tag(tag);
init_ops_.SendInitialMetadata(context->send_initial_metadata_, init_ops_.SendInitialMetadata(context->send_initial_metadata_,

@ -91,6 +91,7 @@ class ClientAsyncResponseReader GRPC_FINAL
collection_->finish_buf_.RecvInitialMetadata(context_); collection_->finish_buf_.RecvInitialMetadata(context_);
} }
collection_->finish_buf_.RecvMessage(msg); collection_->finish_buf_.RecvMessage(msg);
collection_->finish_buf_.AllowNoMessage();
collection_->finish_buf_.ClientRecvStatus(context_, status); collection_->finish_buf_.ClientRecvStatus(context_, status);
call_.PerformOps(&collection_->finish_buf_); call_.PerformOps(&collection_->finish_buf_);
} }

@ -261,10 +261,16 @@ Status CallOpSendMessage::SendMessage(const M& message) {
template <class R> template <class R>
class CallOpRecvMessage { class CallOpRecvMessage {
public: public:
CallOpRecvMessage() : got_message(false), message_(nullptr) {} CallOpRecvMessage()
: got_message(false),
message_(nullptr),
allow_not_getting_message_(false) {}
void RecvMessage(R* message) { message_ = message; } void RecvMessage(R* message) { message_ = message; }
// Do not change status if no message is received.
void AllowNoMessage() { allow_not_getting_message_ = true; }
bool got_message; bool got_message;
protected: protected:
@ -290,14 +296,17 @@ class CallOpRecvMessage {
} }
} else { } else {
got_message = false; got_message = false;
if (!allow_not_getting_message_) {
*status = false; *status = false;
} }
}
message_ = nullptr; message_ = nullptr;
} }
private: private:
R* message_; R* message_;
grpc_byte_buffer* recv_buf_; grpc_byte_buffer* recv_buf_;
bool allow_not_getting_message_;
}; };
namespace CallOpGenericRecvMessageHelper { namespace CallOpGenericRecvMessageHelper {
@ -325,7 +334,8 @@ class DeserializeFuncType GRPC_FINAL : public DeserializeFunc {
class CallOpGenericRecvMessage { class CallOpGenericRecvMessage {
public: public:
CallOpGenericRecvMessage() : got_message(false) {} CallOpGenericRecvMessage()
: got_message(false), allow_not_getting_message_(false) {}
template <class R> template <class R>
void RecvMessage(R* message) { void RecvMessage(R* message) {
@ -336,6 +346,9 @@ class CallOpGenericRecvMessage {
deserialize_.reset(func); deserialize_.reset(func);
} }
// Do not change status if no message is received.
void AllowNoMessage() { allow_not_getting_message_ = true; }
bool got_message; bool got_message;
protected: protected:
@ -360,14 +373,17 @@ class CallOpGenericRecvMessage {
} }
} else { } else {
got_message = false; got_message = false;
if (!allow_not_getting_message_) {
*status = false; *status = false;
} }
}
deserialize_.reset(); deserialize_.reset();
} }
private: private:
std::unique_ptr<CallOpGenericRecvMessageHelper::DeserializeFunc> deserialize_; std::unique_ptr<CallOpGenericRecvMessageHelper::DeserializeFunc> deserialize_;
grpc_byte_buffer* recv_buf_; grpc_byte_buffer* recv_buf_;
bool allow_not_getting_message_;
}; };
class CallOpClientSendClose { class CallOpClientSendClose {

@ -34,7 +34,7 @@
#ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H
#define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H
#include <grpc++/impl/codegen/config_protobuf.h> #include <grpc++/impl/codegen/config.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc/impl/codegen/grpc_types.h> #include <grpc/impl/codegen/grpc_types.h>

@ -189,6 +189,7 @@ class ClientWriter : public ClientWriterInterface<W> {
ClientContext* context, R* response) ClientContext* context, R* response)
: context_(context), call_(channel->CreateCall(method, context, &cq_)) { : context_(context), call_(channel->CreateCall(method, context, &cq_)) {
finish_ops_.RecvMessage(response); finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();
CallOpSet<CallOpSendInitialMetadata> ops; CallOpSet<CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(context->send_initial_metadata_, ops.SendInitialMetadata(context->send_initial_metadata_,

@ -83,8 +83,8 @@
#include <grpc/impl/codegen/atm_gcc_atomic.h> #include <grpc/impl/codegen/atm_gcc_atomic.h>
#elif defined(GPR_GCC_SYNC) #elif defined(GPR_GCC_SYNC)
#include <grpc/impl/codegen/atm_gcc_sync.h> #include <grpc/impl/codegen/atm_gcc_sync.h>
#elif defined(GPR_WIN32_ATOMIC) #elif defined(GPR_WINDOWS_ATOMIC)
#include <grpc/impl/codegen/atm_win32.h> #include <grpc/impl/codegen/atm_windows.h>
#else #else
#error could not determine platform for atm #error could not determine platform for atm
#endif #endif

@ -31,8 +31,8 @@
* *
*/ */
#ifndef GRPC_IMPL_CODEGEN_ATM_WIN32_H #ifndef GRPC_IMPL_CODEGEN_ATM_WINDOWS_H
#define GRPC_IMPL_CODEGEN_ATM_WIN32_H #define GRPC_IMPL_CODEGEN_ATM_WINDOWS_H
/* Win32 variant of atm_platform.h */ /* Win32 variant of atm_platform.h */
#include <grpc/impl/codegen/port_platform.h> #include <grpc/impl/codegen/port_platform.h>
@ -122,4 +122,4 @@ static __inline gpr_atm gpr_atm_full_fetch_add(gpr_atm *p, gpr_atm delta) {
return old; return old;
} }
#endif /* GRPC_IMPL_CODEGEN_ATM_WIN32_H */ #endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */

@ -49,7 +49,7 @@ typedef enum {
/** channel has seen a failure but expects to recover */ /** channel has seen a failure but expects to recover */
GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_CHANNEL_TRANSIENT_FAILURE,
/** channel has seen a failure that it cannot recover from */ /** channel has seen a failure that it cannot recover from */
GRPC_CHANNEL_FATAL_FAILURE GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state; } grpc_connectivity_state;
#ifdef __cplusplus #ifdef __cplusplus

@ -115,6 +115,8 @@ typedef struct {
/* Channel argument keys: */ /* Channel argument keys: */
/** Enable census for tracing and stats collection */ /** Enable census for tracing and stats collection */
#define GRPC_ARG_ENABLE_CENSUS "grpc.census" #define GRPC_ARG_ENABLE_CENSUS "grpc.census"
/** Enable load reporting */
#define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting"
/** Maximum number of concurrent incoming streams to allow on a http2 /** Maximum number of concurrent incoming streams to allow on a http2
connection */ connection */
#define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams" #define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"

@ -89,10 +89,10 @@
#define GPR_ARCH_32 1 #define GPR_ARCH_32 1
#endif #endif
#define GPR_PLATFORM_STRING "windows" #define GPR_PLATFORM_STRING "windows"
#define GPR_WIN32 1 #define GPR_WINDOWS 1
#define GPR_WINSOCK_SOCKET 1 #define GPR_WINSOCK_SOCKET 1
#define GPR_WINDOWS_SUBPROCESS 1 #define GPR_WINDOWS_SUBPROCESS 1
#define GPR_WIN32_ENV #define GPR_WINDOWS_ENV
#ifdef __MSYS__ #ifdef __MSYS__
#define GPR_GETPID_IN_UNISTD_H 1 #define GPR_GETPID_IN_UNISTD_H 1
#define GPR_MSYS_TMPFILE #define GPR_MSYS_TMPFILE
@ -101,17 +101,17 @@
#define GPR_POSIX_TIME #define GPR_POSIX_TIME
#else #else
#define GPR_GETPID_IN_PROCESS_H 1 #define GPR_GETPID_IN_PROCESS_H 1
#define GPR_WIN32_TMPFILE #define GPR_WINDOWS_TMPFILE
#define GPR_WIN32_LOG #define GPR_WINDOWS_LOG
#define GPR_WINDOWS_CRASH_HANDLER 1 #define GPR_WINDOWS_CRASH_HANDLER 1
#define GPR_WIN32_STRING #define GPR_WINDOWS_STRING
#define GPR_WIN32_TIME #define GPR_WINDOWS_TIME
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
#define GPR_GCC_ATOMIC 1 #define GPR_GCC_ATOMIC 1
#define GPR_GCC_TLS 1 #define GPR_GCC_TLS 1
#else #else
#define GPR_WIN32_ATOMIC 1 #define GPR_WINDOWS_ATOMIC 1
#define GPR_MSVC_TLS 1 #define GPR_MSVC_TLS 1
#endif #endif
#elif defined(GPR_MANYLINUX1) #elif defined(GPR_MANYLINUX1)
@ -386,19 +386,19 @@ typedef unsigned __int64 uint64_t;
/* Validate platform combinations */ /* Validate platform combinations */
#if defined(GPR_GCC_ATOMIC) + defined(GPR_GCC_SYNC) + \ #if defined(GPR_GCC_ATOMIC) + defined(GPR_GCC_SYNC) + \
defined(GPR_WIN32_ATOMIC) != \ defined(GPR_WINDOWS_ATOMIC) != \
1 1
#error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WIN32_ATOMIC #error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WINDOWS_ATOMIC
#endif #endif
#if defined(GPR_ARCH_32) + defined(GPR_ARCH_64) != 1 #if defined(GPR_ARCH_32) + defined(GPR_ARCH_64) != 1
#error Must define exactly one of GPR_ARCH_32, GPR_ARCH_64 #error Must define exactly one of GPR_ARCH_32, GPR_ARCH_64
#endif #endif
#if defined(GPR_CPU_LINUX) + defined(GPR_CPU_POSIX) + defined(GPR_WIN32) + \ #if defined(GPR_CPU_LINUX) + defined(GPR_CPU_POSIX) + defined(GPR_WINDOWS) + \
defined(GPR_CPU_IPHONE) + defined(GPR_CPU_CUSTOM) != \ defined(GPR_CPU_IPHONE) + defined(GPR_CPU_CUSTOM) != \
1 1
#error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WIN32, GPR_CPU_IPHONE, GPR_CPU_CUSTOM #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM
#endif #endif
#if defined(GPR_POSIX_MULTIPOLL_WITH_POLL) && !defined(GPR_POSIX_SOCKET) #if defined(GPR_POSIX_MULTIPOLL_WITH_POLL) && !defined(GPR_POSIX_SOCKET)

@ -58,8 +58,8 @@
#if defined(GPR_POSIX_SYNC) #if defined(GPR_POSIX_SYNC)
#include <grpc/impl/codegen/sync_posix.h> #include <grpc/impl/codegen/sync_posix.h>
#elif defined(GPR_WIN32) #elif defined(GPR_WINDOWS)
#include <grpc/impl/codegen/sync_win32.h> #include <grpc/impl/codegen/sync_windows.h>
#elif !defined(GPR_CUSTOM_SYNC) #elif !defined(GPR_CUSTOM_SYNC)
#error Unable to determine platform for sync #error Unable to determine platform for sync
#endif #endif

@ -31,8 +31,8 @@
* *
*/ */
#ifndef GRPC_IMPL_CODEGEN_SYNC_WIN32_H #ifndef GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H
#define GRPC_IMPL_CODEGEN_SYNC_WIN32_H #define GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H
#include <grpc/impl/codegen/sync_generic.h> #include <grpc/impl/codegen/sync_generic.h>
@ -46,4 +46,4 @@ typedef CONDITION_VARIABLE gpr_cv;
typedef INIT_ONCE gpr_once; typedef INIT_ONCE gpr_once;
#define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT #define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT
#endif /* GRPC_IMPL_CODEGEN_SYNC_WIN32_H */ #endif /* GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H */

@ -31,9 +31,9 @@
* *
*/ */
#ifndef GRPCXX_IMPL_PROTO_UTILS_H #ifndef GRPC_SUPPORT_ATM_WINDOWS_H
#define GRPCXX_IMPL_PROTO_UTILS_H #define GRPC_SUPPORT_ATM_WINDOWS_H
#include <grpc++/impl/codegen/proto_utils.h> #include <grpc/impl/codegen/atm_windows.h>
#endif // GRPCXX_IMPL_PROTO_UTILS_H #endif /* GRPC_SUPPORT_ATM_WINDOWS_H */

@ -31,8 +31,8 @@
* *
*/ */
#ifndef GRPC_SUPPORT_LOG_WIN32_H #ifndef GRPC_SUPPORT_LOG_WINDOWS_H
#define GRPC_SUPPORT_LOG_WIN32_H #define GRPC_SUPPORT_LOG_WINDOWS_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -48,4 +48,4 @@ GPRAPI char *gpr_format_message(int messageid);
} }
#endif #endif
#endif /* GRPC_SUPPORT_LOG_WIN32_H */ #endif /* GRPC_SUPPORT_LOG_WINDOWS_H */

@ -1,39 +0,0 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_SUPPORT_SYNC_WIN32_H
#define GRPC_SUPPORT_SYNC_WIN32_H
#include <grpc/impl/codegen/sync_win32.h>
#endif /* GRPC_SUPPORT_SYNC_WIN32_H */

@ -31,9 +31,9 @@
* *
*/ */
#ifndef GRPC_SUPPORT_ATM_WIN32_H #ifndef GRPC_SUPPORT_SYNC_WINDOWS_H
#define GRPC_SUPPORT_ATM_WIN32_H #define GRPC_SUPPORT_SYNC_WINDOWS_H
#include <grpc/impl/codegen/atm_win32.h> #include <grpc/impl/codegen/sync_windows.h>
#endif /* GRPC_SUPPORT_ATM_WIN32_H */ #endif /* GRPC_SUPPORT_SYNC_WINDOWS_H */

@ -54,14 +54,14 @@
<file baseinstalldir="/" name="include/grpc/support/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/atm_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/avl.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/avl.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cmdline.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/cmdline.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cpu.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/cpu.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/histogram.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/histogram.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/host_port.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/host_port.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/log_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/slice.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/slice_buffer.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/slice_buffer.h" role="src" />
@ -70,7 +70,7 @@
<file baseinstalldir="/" name="include/grpc/support/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_generic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/sync_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/thd.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/thd.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/time.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/tls.h" role="src" />
@ -82,7 +82,7 @@
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
@ -90,7 +90,7 @@
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/profiling/timers.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/profiling/timers.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" />
@ -100,7 +100,7 @@
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_win32.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/thd_internal.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/thd_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time_precise.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/time_precise.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tmpfile.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/tmpfile.h" role="src" />
@ -116,7 +116,7 @@
<file baseinstalldir="/" name="src/core/lib/support/cpu_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/cpu_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env_linux.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/histogram.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/histogram.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/host_port.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/host_port.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/load_file.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/load_file.c" role="src" />
@ -124,31 +124,31 @@
<file baseinstalldir="/" name="src/core/lib/support/log_android.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_android.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/slice.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice_buffer.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/slice_buffer.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_util_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string_util_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/subprocess_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/subprocess_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/subprocess_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/subprocess_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/sync.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/sync.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/sync_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/sync_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/sync_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/sync_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/thd.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/thd.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/thd_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/thd_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/thd_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/thd_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/time.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/time_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time_precise.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/time_precise.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/time_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tls_pthread.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/tls_pthread.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tmpfile_msys.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/tmpfile_msys.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tmpfile_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/tmpfile_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tmpfile_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/tmpfile_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/wrap_memcpy.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/wrap_memcpy.c" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer.h" role="src" /> <file baseinstalldir="/" name="include/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" /> <file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" />
@ -166,7 +166,7 @@
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
@ -174,9 +174,8 @@
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_win32.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_cronet.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" />
<file baseinstalldir="/" name="include/grpc/census.h" role="src" /> <file baseinstalldir="/" name="include/grpc/census.h" role="src" />
@ -206,6 +205,7 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.h" role="src" />
@ -214,7 +214,7 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_win32.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.h" role="src" />
@ -314,13 +314,14 @@
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" />
<file baseinstalldir="/" name="third_party/objective_c/Cronet/cronet_c_for_grpc.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_common.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/aggregation.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/aggregation.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" />
@ -355,6 +356,7 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.c" role="src" />
@ -441,7 +443,7 @@
<file baseinstalldir="/" name="src/core/lib/security/credentials/credentials_metadata.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/credentials_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/fake/fake_credentials.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/fake/fake_credentials.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_win32.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/google_default_credentials.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/google_default_credentials.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/iam/iam_credentials.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/iam/iam_credentials.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/json_token.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/json_token.c" role="src" />
@ -483,9 +485,6 @@
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/cronet/client/secure/cronet_channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/cronet/transport/cronet_api_dummy.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/cronet/transport/cronet_transport.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/load_balancer_api.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" />
@ -495,6 +494,8 @@
<file baseinstalldir="/" name="src/core/ext/lb_policy/round_robin/round_robin.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/round_robin/round_robin.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/dns/native/dns_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/resolver/dns/native/dns_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/sockaddr/sockaddr_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/resolver/sockaddr/sockaddr_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />

@ -34,8 +34,7 @@
#ifndef SRC_COMPILER_CONFIG_H #ifndef SRC_COMPILER_CONFIG_H
#define SRC_COMPILER_CONFIG_H #define SRC_COMPILER_CONFIG_H
#include <grpc++/support/config.h> #include <grpc++/impl/codegen/config_protobuf.h>
#include <grpc++/support/config_protobuf.h>
#ifndef GRPC_CUSTOM_DESCRIPTOR #ifndef GRPC_CUSTOM_DESCRIPTOR
#include <google/protobuf/descriptor.h> #include <google/protobuf/descriptor.h>
@ -75,7 +74,15 @@
#define GRPC_CUSTOM_PARSEGENERATORPARAMETER ::google::protobuf::compiler::ParseGeneratorParameter #define GRPC_CUSTOM_PARSEGENERATORPARAMETER ::google::protobuf::compiler::ParseGeneratorParameter
#endif #endif
#ifndef GRPC_CUSTOM_STRING
#include <string>
#define GRPC_CUSTOM_STRING std::string
#endif
namespace grpc { namespace grpc {
typedef GRPC_CUSTOM_STRING string;
namespace protobuf { namespace protobuf {
typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; typedef GRPC_CUSTOM_DESCRIPTOR Descriptor;
typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor; typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor;

@ -65,6 +65,13 @@ inline grpc::string ClassName(const grpc::protobuf::Descriptor *descriptor,
} }
} }
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
return grpc_generator::GetPrefixedComments(desc, leading, "//");
}
} // namespace grpc_cpp_generator } // namespace grpc_cpp_generator
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H #endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H

@ -43,7 +43,7 @@
#include "src/compiler/cpp_generator_helpers.h" #include "src/compiler/cpp_generator_helpers.h"
#include "src/compiler/generator_helpers.h" #include "src/compiler/generator_helpers.h"
using grpc_generator::GetCppComments; using grpc_cpp_generator::GetCppComments;
class ProtoBufMethod : public grpc_cpp_generator::Method { class ProtoBufMethod : public grpc_cpp_generator::Method {
public: public:

@ -52,7 +52,6 @@ using grpc::protobuf::MethodDescriptor;
using grpc::protobuf::io::Printer; using grpc::protobuf::io::Printer;
using grpc::protobuf::io::StringOutputStream; using grpc::protobuf::io::StringOutputStream;
using grpc_generator::MethodType; using grpc_generator::MethodType;
using grpc_generator::GetCppComments;
using grpc_generator::GetMethodType; using grpc_generator::GetMethodType;
using grpc_generator::METHODTYPE_NO_STREAMING; using grpc_generator::METHODTYPE_NO_STREAMING;
using grpc_generator::METHODTYPE_CLIENT_STREAMING; using grpc_generator::METHODTYPE_CLIENT_STREAMING;
@ -120,18 +119,10 @@ std::string GetServiceClassName(const ServiceDescriptor* service) {
return service->name(); return service->name();
} }
std::string GetClientInterfaceName(const ServiceDescriptor* service) {
return "I" + service->name() + "Client";
}
std::string GetClientClassName(const ServiceDescriptor* service) { std::string GetClientClassName(const ServiceDescriptor* service) {
return service->name() + "Client"; return service->name() + "Client";
} }
std::string GetServerInterfaceName(const ServiceDescriptor* service) {
return "I" + service->name();
}
std::string GetServerClassName(const ServiceDescriptor* service) { std::string GetServerClassName(const ServiceDescriptor* service) {
return service->name() + "Base"; return service->name() + "Base";
} }
@ -303,86 +294,6 @@ void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *se
out->Print("\n"); out->Print("\n");
} }
void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) {
out->Print("/// <summary>Client for $servicename$</summary>\n",
"servicename", GetServiceClassName(service));
out->Print("[System.Obsolete(\"Client side interfaced will be removed "
"in the next release. Use client class directly.\")]\n");
out->Print("public interface $name$\n", "name",
GetClientInterfaceName(service));
out->Print("{\n");
out->Indent();
for (int i = 0; i < service->method_count(); i++) {
const MethodDescriptor *method = service->method(i);
MethodType method_type = GetMethodType(method);
if (method_type == METHODTYPE_NO_STREAMING) {
// unary calls have an extra synchronous stub method
GenerateDocCommentBody(out, method);
out->Print(
"$response$ $methodname$($request$ request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n",
"methodname", method->name(), "request",
GetClassName(method->input_type()), "response",
GetClassName(method->output_type()));
// overload taking CallOptions as a param
GenerateDocCommentBody(out, method);
out->Print(
"$response$ $methodname$($request$ request, CallOptions options);\n",
"methodname", method->name(), "request",
GetClassName(method->input_type()), "response",
GetClassName(method->output_type()));
}
std::string method_name = method->name();
if (method_type == METHODTYPE_NO_STREAMING) {
method_name += "Async"; // prevent name clash with synchronous method.
}
GenerateDocCommentBody(out, method);
out->Print(
"$returntype$ $methodname$($request_maybe$Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n",
"methodname", method_name, "request_maybe",
GetMethodRequestParamMaybe(method), "returntype",
GetMethodReturnTypeClient(method));
// overload taking CallOptions as a param
GenerateDocCommentBody(out, method);
out->Print(
"$returntype$ $methodname$($request_maybe$CallOptions options);\n",
"methodname", method_name, "request_maybe",
GetMethodRequestParamMaybe(method), "returntype",
GetMethodReturnTypeClient(method));
}
out->Outdent();
out->Print("}\n");
out->Print("\n");
}
void GenerateServerInterface(Printer* out, const ServiceDescriptor *service) {
out->Print("/// <summary>Interface of server-side implementations of $servicename$</summary>\n",
"servicename", GetServiceClassName(service));
out->Print("[System.Obsolete(\"Service implementations should inherit"
" from the generated abstract base class instead.\")]\n");
out->Print("public interface $name$\n", "name",
GetServerInterfaceName(service));
out->Print("{\n");
out->Indent();
for (int i = 0; i < service->method_count(); i++) {
const MethodDescriptor *method = service->method(i);
GenerateDocCommentBody(out, method);
out->Print(
"$returntype$ $methodname$($request$$response_stream_maybe$, "
"ServerCallContext context);\n",
"methodname", method->name(), "returntype",
GetMethodReturnTypeServer(method), "request",
GetMethodRequestParamServer(method), "response_stream_maybe",
GetMethodResponseStreamMaybe(method));
}
out->Outdent();
out->Print("}\n");
out->Print("\n");
}
void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { void GenerateServerClass(Printer* out, const ServiceDescriptor *service) {
out->Print("/// <summary>Base class for server-side implementations of $servicename$</summary>\n", out->Print("/// <summary>Base class for server-side implementations of $servicename$</summary>\n",
"servicename", GetServiceClassName(service)); "servicename", GetServiceClassName(service));
@ -415,12 +326,9 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor *service) {
void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
out->Print("/// <summary>Client for $servicename$</summary>\n", out->Print("/// <summary>Client for $servicename$</summary>\n",
"servicename", GetServiceClassName(service)); "servicename", GetServiceClassName(service));
out->Print("#pragma warning disable 0618\n");
out->Print( out->Print(
"public class $name$ : ClientBase<$name$>, $interface$\n", "public class $name$ : ClientBase<$name$>\n",
"name", GetClientClassName(service), "name", GetClientClassName(service));
"interface", GetClientInterfaceName(service));
out->Print("#pragma warning restore 0618\n");
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
@ -547,22 +455,16 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
out->Print("\n"); out->Print("\n");
} }
void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service) {
bool use_server_class) {
out->Print( out->Print(
"/// <summary>Creates service definition that can be registered with a server</summary>\n"); "/// <summary>Creates service definition that can be registered with a server</summary>\n");
out->Print("#pragma warning disable 0618\n");
out->Print( out->Print(
"public static ServerServiceDefinition BindService($interface$ serviceImpl)\n", "public static ServerServiceDefinition BindService($implclass$ serviceImpl)\n",
"interface", use_server_class ? GetServerClassName(service) : "implclass", GetServerClassName(service));
GetServerInterfaceName(service));
out->Print("#pragma warning restore 0618\n");
out->Print("{\n"); out->Print("{\n");
out->Indent(); out->Indent();
out->Print( out->Print("return ServerServiceDefinition.CreateBuilder()\n");
"return ServerServiceDefinition.CreateBuilder($servicenamefield$)\n",
"servicenamefield", GetServiceNameFieldName());
out->Indent(); out->Indent();
out->Indent(); out->Indent();
for (int i = 0; i < service->method_count(); i++) { for (int i = 0; i < service->method_count(); i++) {
@ -617,11 +519,7 @@ void GenerateService(Printer* out, const ServiceDescriptor *service,
} }
GenerateServiceDescriptorProperty(out, service); GenerateServiceDescriptorProperty(out, service);
if (generate_client) {
GenerateClientInterface(out, service);
}
if (generate_server) { if (generate_server) {
GenerateServerInterface(out, service);
GenerateServerClass(out, service); GenerateServerClass(out, service);
} }
if (generate_client) { if (generate_client) {
@ -629,8 +527,7 @@ void GenerateService(Printer* out, const ServiceDescriptor *service,
GenerateNewStubMethods(out, service); GenerateNewStubMethods(out, service);
} }
if (generate_server) { if (generate_server) {
GenerateBindServiceMethod(out, service, false); GenerateBindServiceMethod(out, service);
GenerateBindServiceMethod(out, service, true);
} }
out->Outdent(); out->Outdent();
@ -659,7 +556,7 @@ grpc::string GetServices(const FileDescriptor *file, bool generate_client,
out.Print("// source: $filename$\n", "filename", file->name()); out.Print("// source: $filename$\n", "filename", file->name());
// use C++ style as there are no file-level XML comments in .NET // use C++ style as there are no file-level XML comments in .NET
grpc::string leading_comments = GetCppComments(file, true); grpc::string leading_comments = GetCsharpComments(file, true);
if (!leading_comments.empty()) { if (!leading_comments.empty()) {
out.Print("// Original file comments:\n"); out.Print("// Original file comments:\n");
out.Print(leading_comments.c_str()); out.Print(leading_comments.c_str());

@ -45,6 +45,13 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor *file,
return true; return true;
} }
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
inline grpc::string GetCsharpComments(const DescriptorType *desc, bool leading) {
return grpc_generator::GetPrefixedComments(desc, leading, "//");
}
} // namespace grpc_csharp_generator } // namespace grpc_csharp_generator
#endif // GRPC_INTERNAL_COMPILER_CSHARP_GENERATOR_HELPERS_H #endif // GRPC_INTERNAL_COMPILER_CSHARP_GENERATOR_HELPERS_H

@ -265,10 +265,10 @@ inline grpc::string GenerateCommentsWithPrefix(
return oss.str(); return oss.str();
} }
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType> template <typename DescriptorType>
inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) { inline grpc::string GetPrefixedComments(const DescriptorType *desc,
bool leading,
const grpc::string &prefix) {
std::vector<grpc::string> out; std::vector<grpc::string> out;
if (leading) { if (leading) {
grpc_generator::GetComment( grpc_generator::GetComment(
@ -281,7 +281,7 @@ inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING, grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING,
&out); &out);
} }
return GenerateCommentsWithPrefix(out, "//"); return GenerateCommentsWithPrefix(out, prefix);
} }
} // namespace grpc_generator } // namespace grpc_generator

@ -181,45 +181,34 @@ void PrintMethod(const MethodDescriptor *method, Printer *out) {
// Prints out the service descriptor object // Prints out the service descriptor object
void PrintService(const ServiceDescriptor *service, Printer *out) { void PrintService(const ServiceDescriptor *service, Printer *out) {
map<grpc::string, grpc::string> template_vars; map<grpc::string, grpc::string> template_vars;
out->Print(GetNodeComments(service, true).c_str());
template_vars["name"] = service->name(); template_vars["name"] = service->name();
out->Print(template_vars, "var $name$Service = exports.$name$Service = {\n"); out->Print(template_vars, "var $name$Service = exports.$name$Service = {\n");
out->Indent(); out->Indent();
for (int i = 0; i < service->method_count(); i++) { for (int i = 0; i < service->method_count(); i++) {
grpc::string method_name = grpc_generator::LowercaseFirstLetter( grpc::string method_name = grpc_generator::LowercaseFirstLetter(
service->method(i)->name()); service->method(i)->name());
out->Print(GetNodeComments(service->method(i), true).c_str());
out->Print("$method_name$: ", out->Print("$method_name$: ",
"method_name", method_name); "method_name", method_name);
PrintMethod(service->method(i), out); PrintMethod(service->method(i), out);
out->Print(",\n"); out->Print(",\n");
out->Print(GetNodeComments(service->method(i), false).c_str());
} }
out->Outdent(); out->Outdent();
out->Print("};\n\n"); out->Print("};\n\n");
out->Print(template_vars, "exports.$name$Client = " out->Print(template_vars, "exports.$name$Client = "
"grpc.makeGenericClientConstructor($name$Service);\n"); "grpc.makeGenericClientConstructor($name$Service);\n");
out->Print(GetNodeComments(service, false).c_str());
} }
} void PrintImports(const FileDescriptor *file, Printer *out) {
out->Print("var grpc = require('grpc');\n");
grpc::string GetImports(const FileDescriptor *file) {
grpc::string output;
{
StringOutputStream output_stream(&output);
Printer out(&output_stream, '$');
if (file->service_count() == 0) {
return output;
}
out.Print("// GENERATED CODE -- DO NOT EDIT!\n\n");
out.Print("'use strict';\n");
out.Print("var grpc = require('grpc');\n");
if (file->message_type_count() > 0) { if (file->message_type_count() > 0) {
grpc::string file_path = GetRelativePath(file->name(), grpc::string file_path = GetRelativePath(file->name(),
GetJSMessageFilename( GetJSMessageFilename(
file->name())); file->name()));
out.Print("var $module_alias$ = require('$file_path$');\n", out->Print("var $module_alias$ = require('$file_path$');\n",
"module_alias", ModuleAlias(file->name()), "module_alias", ModuleAlias(file->name()),
"file_path", file_path); "file_path", file_path);
} }
@ -227,37 +216,32 @@ grpc::string GetImports(const FileDescriptor *file) {
for (int i = 0; i < file->dependency_count(); i++) { for (int i = 0; i < file->dependency_count(); i++) {
grpc::string file_path = GetRelativePath( grpc::string file_path = GetRelativePath(
file->name(), GetJSMessageFilename(file->dependency(i)->name())); file->name(), GetJSMessageFilename(file->dependency(i)->name()));
out.Print("var $module_alias$ = require('$file_path$');\n", out->Print("var $module_alias$ = require('$file_path$');\n",
"module_alias", ModuleAlias(file->dependency(i)->name()), "module_alias", ModuleAlias(file->dependency(i)->name()),
"file_path", file_path); "file_path", file_path);
} }
out.Print("\n"); out->Print("\n");
}
return output;
} }
grpc::string GetTransformers(const FileDescriptor *file) { void PrintTransformers(const FileDescriptor *file, Printer *out) {
grpc::string output;
{
StringOutputStream output_stream(&output);
Printer out(&output_stream, '$');
if (file->service_count() == 0) {
return output;
}
map<grpc::string, const Descriptor*> messages = GetAllMessages(file); map<grpc::string, const Descriptor*> messages = GetAllMessages(file);
for (std::map<grpc::string, const Descriptor*>::iterator it = for (std::map<grpc::string, const Descriptor*>::iterator it =
messages.begin(); messages.begin();
it != messages.end(); it++) { it != messages.end(); it++) {
PrintMessageTransformer(it->second, &out); PrintMessageTransformer(it->second, out);
} }
out.Print("\n"); out->Print("\n");
}
void PrintServices(const FileDescriptor *file, Printer *out) {
for (int i = 0; i < file->service_count(); i++) {
PrintService(file->service(i), out);
} }
return output;
} }
grpc::string GetServices(const FileDescriptor *file) { }
grpc::string GenerateFile(const FileDescriptor *file) {
grpc::string output; grpc::string output;
{ {
StringOutputStream output_stream(&output); StringOutputStream output_stream(&output);
@ -266,10 +250,23 @@ grpc::string GetServices(const FileDescriptor *file) {
if (file->service_count() == 0) { if (file->service_count() == 0) {
return output; return output;
} }
out.Print("// GENERATED CODE -- DO NOT EDIT!\n\n");
for (int i = 0; i < file->service_count(); i++) { grpc::string leading_comments = GetNodeComments(file, true);
PrintService(file->service(i), &out); if (!leading_comments.empty()) {
out.Print("// Original file comments:\n");
out.Print(leading_comments.c_str());
} }
out.Print("'use strict';\n");
PrintImports(file, &out);
PrintTransformers(file, &out);
PrintServices(file, &out);
out.Print(GetNodeComments(file, false).c_str());
} }
return output; return output;
} }

@ -38,11 +38,7 @@
namespace grpc_node_generator { namespace grpc_node_generator {
grpc::string GetImports(const grpc::protobuf::FileDescriptor *file); grpc::string GenerateFile(const grpc::protobuf::FileDescriptor *file);
grpc::string GetTransformers(const grpc::protobuf::FileDescriptor *file);
grpc::string GetServices(const grpc::protobuf::FileDescriptor *file);
} // namespace grpc_node_generator } // namespace grpc_node_generator

@ -45,6 +45,13 @@ inline grpc::string GetJSServiceFilename(const grpc::string& filename) {
return grpc_generator::StripProto(filename) + "_grpc_pb.js"; return grpc_generator::StripProto(filename) + "_grpc_pb.js";
} }
// Get leading or trailing comments in a string. Comment lines start with "// ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
inline grpc::string GetNodeComments(const DescriptorType *desc, bool leading) {
return grpc_generator::GetPrefixedComments(desc, leading, "//");
}
} // namespace grpc_node_generator } // namespace grpc_node_generator
#endif // GRPC_INTERNAL_COMPILER_NODE_GENERATOR_HELPERS_H #endif // GRPC_INTERNAL_COMPILER_NODE_GENERATOR_HELPERS_H

@ -39,10 +39,8 @@
#include "src/compiler/node_generator.h" #include "src/compiler/node_generator.h"
#include "src/compiler/node_generator_helpers.h" #include "src/compiler/node_generator_helpers.h"
using grpc_node_generator::GetImports; using grpc_node_generator::GenerateFile;
using grpc_node_generator::GetJSServiceFilename; using grpc_node_generator::GetJSServiceFilename;
using grpc_node_generator::GetServices;
using grpc_node_generator::GetTransformers;
class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public: public:
@ -53,9 +51,7 @@ class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
const grpc::string &parameter, const grpc::string &parameter,
grpc::protobuf::compiler::GeneratorContext *context, grpc::protobuf::compiler::GeneratorContext *context,
grpc::string *error) const { grpc::string *error) const {
grpc::string code = GetImports(file) + grpc::string code = GenerateFile(file);
GetTransformers(file) +
GetServices(file);
if (code.size() == 0) { if (code.size() == 0) {
return true; return true;
} }

@ -66,7 +66,9 @@ void PrintMethod(const MethodDescriptor *method, const grpc::string &package,
std::map<grpc::string, grpc::string> method_vars = std::map<grpc::string, grpc::string> method_vars =
ListToDict({"mth.name", method->name(), "input.type", input_type, ListToDict({"mth.name", method->name(), "input.type", input_type,
"output.type", output_type, }); "output.type", output_type, });
out->Print(GetRubyComments(method, true).c_str());
out->Print(method_vars, "rpc :$mth.name$, $input.type$, $output.type$\n"); out->Print(method_vars, "rpc :$mth.name$, $input.type$, $output.type$\n");
out->Print(GetRubyComments(method, false).c_str());
} }
// Prints out the service using the ruby gRPC DSL. // Prints out the service using the ruby gRPC DSL.
@ -82,12 +84,7 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package,
out->Print(module_vars, "module $module.name$\n"); out->Print(module_vars, "module $module.name$\n");
out->Indent(); out->Indent();
// TODO(temiola): add documentation out->Print(GetRubyComments(service, true).c_str());
grpc::string doc = "TODO: add proto service documentation here";
std::map<grpc::string, grpc::string> template_vars =
ListToDict({"Documentation", doc, });
out->Print("\n");
out->Print(template_vars, "# $Documentation$\n");
out->Print("class Service\n"); out->Print("class Service\n");
// Write the indented class body. // Write the indented class body.
@ -113,6 +110,7 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package,
// End the service module // End the service module
out->Outdent(); out->Outdent();
out->Print("end\n"); out->Print("end\n");
out->Print(GetRubyComments(service, false).c_str());
} }
} // namespace } // namespace
@ -138,6 +136,12 @@ grpc::string GetServices(const FileDescriptor *file) {
out.Print(header_comment_vars, out.Print(header_comment_vars,
"# Source: $file.name$ for package '$file.package$'\n"); "# Source: $file.name$ for package '$file.package$'\n");
grpc::string leading_comments = GetRubyComments(file, true);
if (!leading_comments.empty()) {
out.Print("# Original file comments:\n");
out.Print(leading_comments.c_str());
}
out.Print("\n"); out.Print("\n");
out.Print("require 'grpc'\n"); out.Print("require 'grpc'\n");
// Write out require statemment to import the separately generated file // Write out require statemment to import the separately generated file
@ -164,6 +168,8 @@ grpc::string GetServices(const FileDescriptor *file) {
out.Outdent(); out.Outdent();
out.Print("end\n"); out.Print("end\n");
} }
out.Print(GetRubyComments(file, false).c_str());
} }
return output; return output;
} }

@ -35,6 +35,7 @@
#define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H #define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H
#include "src/compiler/config.h" #include "src/compiler/config.h"
#include "src/compiler/generator_helpers.h"
#include "src/compiler/ruby_generator_string-inl.h" #include "src/compiler/ruby_generator_string-inl.h"
namespace grpc_ruby_generator { namespace grpc_ruby_generator {
@ -60,6 +61,13 @@ inline grpc::string MessagesRequireName(
return Replace(file->name(), ".proto", ""); return Replace(file->name(), ".proto", "");
} }
// Get leading or trailing comments in a string. Comment lines start with "# ".
// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
inline grpc::string GetRubyComments(const DescriptorType *desc, bool leading) {
return grpc_generator::GetPrefixedComments(desc, leading, "#");
}
} // namespace grpc_ruby_generator } // namespace grpc_ruby_generator
#endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H #endif // GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_HELPERS_INL_H

@ -134,7 +134,9 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx,
} }
static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem, void *ignored) { grpc_call_element *elem,
const grpc_call_stats *stats,
void *ignored) {
call_data *d = elem->call_data; call_data *d = elem->call_data;
GPR_ASSERT(d != NULL); GPR_ASSERT(d != NULL);
/* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ /* TODO(hongyu): record rpc client stats and census_rpc_end_op here */
@ -152,7 +154,9 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx,
} }
static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem, void *ignored) { grpc_call_element *elem,
const grpc_call_stats *stats,
void *ignored) {
call_data *d = elem->call_data; call_data *d = elem->call_data;
GPR_ASSERT(d != NULL); GPR_ASSERT(d != NULL);
/* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ /* TODO(hongyu): record rpc server stats and census_tracing_end_op here */
@ -176,7 +180,7 @@ const grpc_channel_filter grpc_client_census_filter = {
grpc_channel_next_op, grpc_channel_next_op,
sizeof(call_data), sizeof(call_data),
client_init_call_elem, client_init_call_elem,
grpc_call_stack_ignore_set_pollset, grpc_call_stack_ignore_set_pollset_or_pollset_set,
client_destroy_call_elem, client_destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,
@ -189,7 +193,7 @@ const grpc_channel_filter grpc_server_census_filter = {
grpc_channel_next_op, grpc_channel_next_op,
sizeof(call_data), sizeof(call_data),
server_init_call_elem, server_init_call_elem,
grpc_call_stack_ignore_set_pollset, grpc_call_stack_ignore_set_pollset_or_pollset_set,
server_destroy_call_elem, server_destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -62,7 +62,7 @@ grpc_connectivity_state grpc_channel_check_connectivity_state(
"not a (u)client channel, but '%s'", "not a (u)client channel, but '%s'",
client_channel_elem->filter->name); client_channel_elem->filter->name);
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
return GRPC_CHANNEL_FATAL_FAILURE; return GRPC_CHANNEL_SHUTDOWN;
} }
typedef enum { typedef enum {

@ -119,7 +119,7 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx,
grpc_connectivity_state state, grpc_connectivity_state state,
const char *reason) { const char *reason) {
if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE || if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
state == GRPC_CHANNEL_FATAL_FAILURE) && state == GRPC_CHANNEL_SHUTDOWN) &&
chand->lb_policy != NULL) { chand->lb_policy != NULL) {
/* cancel fail-fast picks */ /* cancel fail-fast picks */
grpc_lb_policy_cancel_picks( grpc_lb_policy_cancel_picks(
@ -136,8 +136,7 @@ static void on_lb_policy_state_changed_locked(
/* check if the notification is for a stale policy */ /* check if the notification is for a stale policy */
if (w->lb_policy != w->chand->lb_policy) return; if (w->lb_policy != w->chand->lb_policy) return;
if (publish_state == GRPC_CHANNEL_FATAL_FAILURE && if (publish_state == GRPC_CHANNEL_SHUTDOWN && w->chand->resolver != NULL) {
w->chand->resolver != NULL) {
publish_state = GRPC_CHANNEL_TRANSIENT_FAILURE; publish_state = GRPC_CHANNEL_TRANSIENT_FAILURE;
grpc_resolver_channel_saw_error(exec_ctx, w->chand->resolver); grpc_resolver_channel_saw_error(exec_ctx, w->chand->resolver);
GRPC_LB_POLICY_UNREF(exec_ctx, w->chand->lb_policy, "channel"); GRPC_LB_POLICY_UNREF(exec_ctx, w->chand->lb_policy, "channel");
@ -145,7 +144,7 @@ static void on_lb_policy_state_changed_locked(
} }
set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state, set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state,
"lb_changed"); "lb_changed");
if (w->state != GRPC_CHANNEL_FATAL_FAILURE) { if (w->state != GRPC_CHANNEL_SHUTDOWN) {
watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state); watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state);
} }
} }
@ -237,7 +236,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
chand->resolver = NULL; chand->resolver = NULL;
} }
set_channel_connectivity_state_locked( set_channel_connectivity_state_locked(
exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "resolver_gone"); exec_ctx, chand, GRPC_CHANNEL_SHUTDOWN, "resolver_gone");
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
} }
@ -292,8 +291,8 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
} }
if (op->disconnect && chand->resolver != NULL) { if (op->disconnect && chand->resolver != NULL) {
set_channel_connectivity_state_locked( set_channel_connectivity_state_locked(exec_ctx, chand,
exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "disconnect"); GRPC_CHANNEL_SHUTDOWN, "disconnect");
grpc_resolver_shutdown(exec_ctx, chand->resolver); grpc_resolver_shutdown(exec_ctx, chand->resolver);
GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel");
chand->resolver = NULL; chand->resolver = NULL;
@ -377,7 +376,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
int r; int r;
GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel"); GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel");
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset, r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollent,
initial_metadata, initial_metadata_flags, initial_metadata, initial_metadata_flags,
connected_subchannel, on_ready); connected_subchannel, on_ready);
GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel");
@ -416,6 +415,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_stats *stats,
void *and_free_memory) { void *and_free_memory) {
grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data); grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data);
gpr_free(and_free_memory); gpr_free(and_free_memory);
@ -461,10 +461,11 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
gpr_mu_destroy(&chand->mu_config); gpr_mu_destroy(&chand->mu_config);
} }
static void cc_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset) { grpc_call_element *elem,
grpc_polling_entity *pollent) {
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
calld->pollset = pollset; calld->pollent = pollent;
} }
const grpc_channel_filter grpc_client_channel_filter = { const grpc_channel_filter grpc_client_channel_filter = {
@ -472,7 +473,7 @@ const grpc_channel_filter grpc_client_channel_filter = {
cc_start_transport_op, cc_start_transport_op,
sizeof(call_data), sizeof(call_data),
init_call_elem, init_call_elem,
cc_set_pollset, cc_set_pollset_or_pollset_set,
destroy_call_elem, destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -99,12 +99,12 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx,
} }
int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata, grpc_metadata_batch *initial_metadata,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **target, grpc_connected_subchannel **target,
grpc_closure *on_complete) { grpc_closure *on_complete) {
return policy->vtable->pick(exec_ctx, policy, pollset, initial_metadata, return policy->vtable->pick(exec_ctx, policy, pollent, initial_metadata,
initial_metadata_flags, target, on_complete); initial_metadata_flags, target, on_complete);
} }

@ -35,6 +35,7 @@
#define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H #define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H
#include "src/core/ext/client_config/subchannel.h" #include "src/core/ext/client_config/subchannel.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/connectivity_state.h"
/** A load balancing policy: specified by a vtable and a struct (which /** A load balancing policy: specified by a vtable and a struct (which
@ -59,7 +60,8 @@ struct grpc_lb_policy_vtable {
/** implement grpc_lb_policy_pick */ /** implement grpc_lb_policy_pick */
int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **target, grpc_closure *on_complete); grpc_connected_subchannel **target, grpc_closure *on_complete);
void (*cancel_pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, void (*cancel_pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
@ -124,7 +126,7 @@ void grpc_lb_policy_init(grpc_lb_policy *policy,
\a target. \a target.
Picking can be asynchronous. Any IO should be done under \a pollset. */ Picking can be asynchronous. Any IO should be done under \a pollset. */
int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata, grpc_metadata_batch *initial_metadata,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **target, grpc_connected_subchannel **target,

@ -480,11 +480,11 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p,
if (iomgr_success) { if (iomgr_success) {
if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
/* any errors on a subchannel ==> we're done, create a new one */ /* any errors on a subchannel ==> we're done, create a new one */
sw->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; sw->connectivity_state = GRPC_CHANNEL_SHUTDOWN;
} }
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, grpc_connectivity_state_set(exec_ctx, &c->state_tracker,
sw->connectivity_state, "reflect_child"); sw->connectivity_state, "reflect_child");
if (sw->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { if (sw->connectivity_state != GRPC_CHANNEL_SHUTDOWN) {
grpc_connected_subchannel_notify_on_state_change( grpc_connected_subchannel_notify_on_state_change(
exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL,
&sw->connectivity_state, &sw->closure); &sw->connectivity_state, &sw->closure);
@ -645,7 +645,7 @@ static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call,
grpc_subchannel_call *c = call; grpc_subchannel_call *c = call;
GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0); GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0);
grpc_connected_subchannel *connection = c->connection; grpc_connected_subchannel *connection = c->connection;
grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c), c); grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c), NULL, c);
GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, connection, "subchannel_call"); GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, connection, "subchannel_call");
GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0); GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0);
} }
@ -683,7 +683,7 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel(
grpc_subchannel_call *grpc_connected_subchannel_create_call( grpc_subchannel_call *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con,
grpc_pollset *pollset) { grpc_polling_entity *pollent) {
grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con);
grpc_subchannel_call *call = grpc_subchannel_call *call =
gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
@ -692,7 +692,7 @@ grpc_subchannel_call *grpc_connected_subchannel_create_call(
GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call, grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call,
NULL, NULL, callstk); NULL, NULL, callstk);
grpc_call_stack_set_pollset(exec_ctx, callstk, pollset); grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollent);
return call; return call;
} }

@ -36,6 +36,7 @@
#include "src/core/ext/client_config/connector.h" #include "src/core/ext/client_config/connector.h"
#include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/connectivity_state.h"
/** A (sub-)channel that knows how to connect to exactly one target /** A (sub-)channel that knows how to connect to exactly one target
@ -109,7 +110,7 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx,
/** construct a subchannel call */ /** construct a subchannel call */
grpc_subchannel_call *grpc_connected_subchannel_create_call( grpc_subchannel_call *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel,
grpc_pollset *pollset); grpc_polling_entity *pollent);
/** process a transport level op */ /** process a transport level op */
void grpc_connected_subchannel_process_transport_op( void grpc_connected_subchannel_process_transport_op(

@ -68,6 +68,7 @@ void grpc_subchannel_call_holder_init(
holder->waiting_ops_capacity = 0; holder->waiting_ops_capacity = 0;
holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
holder->owning_call = owning_call; holder->owning_call = owning_call;
holder->pollent = NULL;
} }
void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx,
@ -157,7 +158,7 @@ retry:
gpr_atm_rel_store( gpr_atm_rel_store(
&holder->subchannel_call, &holder->subchannel_call,
(gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call(
exec_ctx, holder->connected_subchannel, holder->pollset)); exec_ctx, holder->connected_subchannel, holder->pollent));
retry_waiting_locked(exec_ctx, holder); retry_waiting_locked(exec_ctx, holder);
goto retry; goto retry;
} }
@ -183,7 +184,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
gpr_atm_rel_store( gpr_atm_rel_store(
&holder->subchannel_call, &holder->subchannel_call,
(gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call(
exec_ctx, holder->connected_subchannel, holder->pollset)); exec_ctx, holder->connected_subchannel, holder->pollent));
retry_waiting_locked(exec_ctx, holder); retry_waiting_locked(exec_ctx, holder);
} }
gpr_mu_unlock(&holder->mu); gpr_mu_unlock(&holder->mu);

@ -35,6 +35,7 @@
#define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H #define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H
#include "src/core/ext/client_config/subchannel.h" #include "src/core/ext/client_config/subchannel.h"
#include "src/core/lib/iomgr/polling_entity.h"
/** Pick a subchannel for grpc_subchannel_call_holder; /** Pick a subchannel for grpc_subchannel_call_holder;
Return 1 if subchannel is available immediately (in which case on_ready Return 1 if subchannel is available immediately (in which case on_ready
@ -71,7 +72,7 @@ typedef struct grpc_subchannel_call_holder {
grpc_subchannel_call_holder_creation_phase creation_phase; grpc_subchannel_call_holder_creation_phase creation_phase;
grpc_connected_subchannel *connected_subchannel; grpc_connected_subchannel *connected_subchannel;
grpc_pollset *pollset; grpc_polling_entity *pollent;
grpc_transport_stream_op *waiting_ops; grpc_transport_stream_op *waiting_ops;
size_t waiting_ops_count; size_t waiting_ops_count;

@ -39,7 +39,7 @@
typedef struct pending_pick { typedef struct pending_pick {
struct pending_pick *next; struct pending_pick *next;
grpc_pollset *pollset; grpc_polling_entity *pollent;
uint32_t initial_metadata_flags; uint32_t initial_metadata_flags;
grpc_connected_subchannel **target; grpc_connected_subchannel **target;
grpc_closure *on_complete; grpc_closure *on_complete;
@ -104,7 +104,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
pp = p->pending_picks; pp = p->pending_picks;
p->pending_picks = NULL; p->pending_picks = NULL;
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); GRPC_CHANNEL_SHUTDOWN, "shutdown");
/* cancel subscription */ /* cancel subscription */
if (selected != NULL) { if (selected != NULL) {
grpc_connected_subchannel_notify_on_state_change( grpc_connected_subchannel_notify_on_state_change(
@ -118,8 +118,8 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
while (pp != NULL) { while (pp != NULL) {
pending_pick *next = pp->next; pending_pick *next = pp->next;
*pp->target = NULL; *pp->target = NULL;
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp); gpr_free(pp);
pp = next; pp = next;
@ -136,8 +136,8 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
while (pp != NULL) { while (pp != NULL) {
pending_pick *next = pp->next; pending_pick *next = pp->next;
if (pp->target == target) { if (pp->target == target) {
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
*target = NULL; *target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp); gpr_free(pp);
@ -162,8 +162,8 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pending_pick *next = pp->next; pending_pick *next = pp->next;
if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == if ((pp->initial_metadata_flags & initial_metadata_flags_mask) ==
initial_metadata_flags_eq) { initial_metadata_flags_eq) {
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp); gpr_free(pp);
} else { } else {
@ -196,7 +196,8 @@ static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
} }
static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **target, grpc_connected_subchannel **target,
grpc_closure *on_complete) { grpc_closure *on_complete) {
@ -221,10 +222,11 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (!p->started_picking) { if (!p->started_picking) {
start_picking(exec_ctx, p); start_picking(exec_ctx, p);
} }
grpc_pollset_set_add_pollset(exec_ctx, p->base.interested_parties, pollset); grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp)); pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks; pp->next = p->pending_picks;
pp->pollset = pollset; pp->pollent = pollent;
pp->target = target; pp->target = target;
pp->initial_metadata_flags = initial_metadata_flags; pp->initial_metadata_flags = initial_metadata_flags;
pp->on_complete = on_complete; pp->on_complete = on_complete;
@ -273,11 +275,11 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
} else if (selected != NULL) { } else if (selected != NULL) {
if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) { if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) {
/* if the selected channel goes bad, we're done */ /* if the selected channel goes bad, we're done */
p->checking_connectivity = GRPC_CHANNEL_FATAL_FAILURE; p->checking_connectivity = GRPC_CHANNEL_SHUTDOWN;
} }
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
p->checking_connectivity, "selected_changed"); p->checking_connectivity, "selected_changed");
if (p->checking_connectivity != GRPC_CHANNEL_FATAL_FAILURE) { if (p->checking_connectivity != GRPC_CHANNEL_SHUTDOWN) {
grpc_connected_subchannel_notify_on_state_change( grpc_connected_subchannel_notify_on_state_change(
exec_ctx, selected, p->base.interested_parties, exec_ctx, selected, p->base.interested_parties,
&p->checking_connectivity, &p->connectivity_changed); &p->checking_connectivity, &p->connectivity_changed);
@ -304,8 +306,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
while ((pp = p->pending_picks)) { while ((pp = p->pending_picks)) {
p->pending_picks = pp->next; p->pending_picks = pp->next;
*pp->target = selected; *pp->target = selected;
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp); gpr_free(pp);
} }
@ -343,7 +345,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
p->base.interested_parties, &p->checking_connectivity, p->base.interested_parties, &p->checking_connectivity,
&p->connectivity_changed); &p->connectivity_changed);
break; break;
case GRPC_CHANNEL_FATAL_FAILURE: case GRPC_CHANNEL_SHUTDOWN:
p->num_subchannels--; p->num_subchannels--;
GPR_SWAP(grpc_subchannel *, p->subchannels[p->checking_subchannel], GPR_SWAP(grpc_subchannel *, p->subchannels[p->checking_subchannel],
p->subchannels[p->num_subchannels]); p->subchannels[p->num_subchannels]);
@ -351,7 +353,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
"pick_first"); "pick_first");
if (p->num_subchannels == 0) { if (p->num_subchannels == 0) {
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_FATAL_FAILURE, GRPC_CHANNEL_SHUTDOWN,
"no_more_channels"); "no_more_channels");
while ((pp = p->pending_picks)) { while ((pp = p->pending_picks)) {
p->pending_picks = pp->next; p->pending_picks = pp->next;

@ -48,7 +48,7 @@ int grpc_lb_round_robin_trace = 0;
* Once a pick is available, \a target is updated and \a on_complete called. */ * Once a pick is available, \a target is updated and \a on_complete called. */
typedef struct pending_pick { typedef struct pending_pick {
struct pending_pick *next; struct pending_pick *next;
grpc_pollset *pollset; grpc_polling_entity *pollent;
uint32_t initial_metadata_flags; uint32_t initial_metadata_flags;
grpc_connected_subchannel **target; grpc_connected_subchannel **target;
grpc_closure *on_complete; grpc_closure *on_complete;
@ -243,7 +243,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_free(pp); gpr_free(pp);
} }
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); GRPC_CHANNEL_SHUTDOWN, "shutdown");
for (i = 0; i < p->num_subchannels; i++) { for (i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i]; subchannel_data *sd = p->subchannels[i];
grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL, grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL,
@ -262,8 +262,8 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
while (pp != NULL) { while (pp != NULL) {
pending_pick *next = pp->next; pending_pick *next = pp->next;
if (pp->target == target) { if (pp->target == target) {
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
*target = NULL; *target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp); gpr_free(pp);
@ -288,8 +288,8 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
pending_pick *next = pp->next; pending_pick *next = pp->next;
if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == if ((pp->initial_metadata_flags & initial_metadata_flags_mask) ==
initial_metadata_flags_eq) { initial_metadata_flags_eq) {
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
*pp->target = NULL; *pp->target = NULL;
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL);
gpr_free(pp); gpr_free(pp);
@ -331,7 +331,8 @@ static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
} }
static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, grpc_polling_entity *pollent,
grpc_metadata_batch *initial_metadata,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **target, grpc_connected_subchannel **target,
grpc_closure *on_complete) { grpc_closure *on_complete) {
@ -354,10 +355,11 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (!p->started_picking) { if (!p->started_picking) {
start_picking(exec_ctx, p); start_picking(exec_ctx, p);
} }
grpc_pollset_set_add_pollset(exec_ctx, p->base.interested_parties, pollset); grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp)); pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks; pp->next = p->pending_picks;
pp->pollset = pollset; pp->pollent = pollent;
pp->target = target; pp->target = target;
pp->on_complete = on_complete; pp->on_complete = on_complete;
pp->initial_metadata_flags = initial_metadata_flags; pp->initial_metadata_flags = initial_metadata_flags;
@ -406,8 +408,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)",
selected->subchannel, selected); selected->subchannel, selected);
} }
grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
pp->pollset); p->base.interested_parties);
grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL);
gpr_free(pp); gpr_free(pp);
} }
@ -439,7 +441,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_CHANNEL_TRANSIENT_FAILURE,
"connecting_transient_failure"); "connecting_transient_failure");
break; break;
case GRPC_CHANNEL_FATAL_FAILURE: case GRPC_CHANNEL_SHUTDOWN:
if (sd->ready_list_node != NULL) { if (sd->ready_list_node != NULL) {
remove_disconnected_sc_locked(p, sd->ready_list_node); remove_disconnected_sc_locked(p, sd->ready_list_node);
sd->ready_list_node = NULL; sd->ready_list_node = NULL;
@ -455,7 +457,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
unref = 1; unref = 1;
if (p->num_subchannels == 0) { if (p->num_subchannels == 0) {
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_FATAL_FAILURE, GRPC_CHANNEL_SHUTDOWN,
"no_more_channels"); "no_more_channels");
while ((pp = p->pending_picks)) { while ((pp = p->pending_picks)) {
p->pending_picks = pp->next; p->pending_picks = pp->next;

@ -0,0 +1,132 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <limits.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/sync.h>
#include "src/core/ext/load_reporting/load_reporting.h"
#include "src/core/ext/load_reporting/load_reporting_filter.h"
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/surface/channel_init.h"
struct grpc_load_reporting_config {
grpc_load_reporting_fn fn;
void *user_data;
};
grpc_load_reporting_config *grpc_load_reporting_config_create(
grpc_load_reporting_fn fn, void *user_data) {
GPR_ASSERT(fn != NULL);
grpc_load_reporting_config *lrc =
gpr_malloc(sizeof(grpc_load_reporting_config));
lrc->fn = fn;
lrc->user_data = user_data;
return lrc;
}
grpc_load_reporting_config *grpc_load_reporting_config_copy(
grpc_load_reporting_config *src) {
return grpc_load_reporting_config_create(src->fn, src->user_data);
}
void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc) {
gpr_free(lrc);
}
void grpc_load_reporting_config_call(
grpc_load_reporting_config *lrc,
const grpc_load_reporting_call_data *call_data) {
lrc->fn(call_data, lrc->user_data);
}
static bool is_load_reporting_enabled(const grpc_channel_args *a) {
if (a == NULL) return false;
for (size_t i = 0; i < a->num_args; i++) {
if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) {
return a->args[i].value.pointer.p != NULL;
}
}
return false;
}
static bool maybe_add_load_reporting_filter(grpc_channel_stack_builder *builder,
void *arg) {
const grpc_channel_args *args =
grpc_channel_stack_builder_get_channel_arguments(builder);
if (is_load_reporting_enabled(args)) {
return grpc_channel_stack_builder_prepend_filter(
builder, (const grpc_channel_filter *)arg, NULL, NULL);
}
return true;
}
static void lrd_arg_destroy(void *p) { grpc_load_reporting_config_destroy(p); }
static void *lrd_arg_copy(void *p) {
return grpc_load_reporting_config_copy(p);
}
static int lrd_arg_cmp(void *a, void *b) {
grpc_load_reporting_config *lhs = a;
grpc_load_reporting_config *rhs = b;
return !(lhs->fn == rhs->fn && lhs->user_data == rhs->user_data);
}
static const grpc_arg_pointer_vtable lrd_ptr_vtable = {
lrd_arg_copy, lrd_arg_destroy, lrd_arg_cmp};
grpc_arg grpc_load_reporting_config_create_arg(
grpc_load_reporting_config *lrc) {
grpc_arg arg;
arg.type = GRPC_ARG_POINTER;
arg.key = GRPC_ARG_ENABLE_LOAD_REPORTING;
arg.value.pointer.p = lrc;
arg.value.pointer.vtable = &lrd_ptr_vtable;
return arg;
}
/* Plugin registration */
void grpc_load_reporting_plugin_init(void) {
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
maybe_add_load_reporting_filter,
(void *)&grpc_load_reporting_filter);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_load_reporting_filter,
(void *)&grpc_load_reporting_filter);
}
void grpc_load_reporting_plugin_shutdown() {}

@ -0,0 +1,75 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H
#define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/surface/call.h"
typedef struct grpc_load_reporting_config grpc_load_reporting_config;
/** Call information to be passed to the provided load reporting function upon
* completion of the call */
typedef struct grpc_load_reporting_call_data {
const grpc_call_stats *stats; /**< Stats for the call */
const char *trailing_md_string; /**< LR trailing metadata info */
} grpc_load_reporting_call_data;
/** Custom function to be called by the load reporting filter. */
typedef void (*grpc_load_reporting_fn)(
const grpc_load_reporting_call_data *call_data, void *user_data);
/** Register \a fn as the function to be invoked by the load reporting filter.
* \a fn will be invoked at the beginning and at the end of the call.
*
* For the first invocation, \a fn's first argument
* (grpc_load_reporting_call_data*) will be NULL. \a user_data is always passed
* as-is. */
grpc_load_reporting_config *grpc_load_reporting_config_create(
grpc_load_reporting_fn fn, void *user_data);
grpc_load_reporting_config *grpc_load_reporting_config_copy(
grpc_load_reporting_config *src);
void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc);
/** Invoke the function registered by \a grpc_load_reporting_init. */
void grpc_load_reporting_config_call(
grpc_load_reporting_config *lrc,
const grpc_load_reporting_call_data *call_data);
/** Return a \a grpc_arg enabling load reporting */
grpc_arg grpc_load_reporting_config_create_arg(grpc_load_reporting_config *lrc);
#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H */

@ -0,0 +1,151 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <string.h>
#include "src/core/ext/load_reporting/load_reporting.h"
#include "src/core/ext/load_reporting/load_reporting_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/transport/static_metadata.h"
typedef struct call_data { const char *trailing_md_string; } call_data;
typedef struct channel_data {
gpr_mu mu;
grpc_load_reporting_config *lrc;
} channel_data;
static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc,
grpc_load_reporting_call_data *lr_call_data) {
GPR_TIMER_BEGIN("load_reporting_config_fn", 0);
grpc_load_reporting_config_call(lrc, lr_call_data);
GPR_TIMER_END("load_reporting_config_fn", 0);
}
/* Constructor for call_data */
static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;
memset(calld, 0, sizeof(call_data));
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_stats *stats, void *ignored) {
channel_data *chand = elem->channel_data;
call_data *calld = elem->call_data;
grpc_load_reporting_call_data lr_call_data = {stats,
calld->trailing_md_string};
gpr_mu_lock(&chand->mu);
invoke_lr_fn_locked(chand->lrc, &lr_call_data);
gpr_mu_unlock(&chand->mu);
}
/* Constructor for channel_data */
static void init_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem,
grpc_channel_element_args *args) {
GPR_ASSERT(!args->is_last);
channel_data *chand = elem->channel_data;
memset(chand, 0, sizeof(channel_data));
gpr_mu_init(&chand->mu);
for (size_t i = 0; i < args->channel_args->num_args; i++) {
if (0 == strcmp(args->channel_args->args[i].key,
GRPC_ARG_ENABLE_LOAD_REPORTING)) {
grpc_load_reporting_config *arg_lrc =
args->channel_args->args[i].value.pointer.p;
chand->lrc = grpc_load_reporting_config_copy(arg_lrc);
GPR_ASSERT(chand->lrc != NULL);
break;
}
}
GPR_ASSERT(chand->lrc != NULL); /* arg actually found */
gpr_mu_lock(&chand->mu);
invoke_lr_fn_locked(chand->lrc, NULL);
gpr_mu_unlock(&chand->mu);
}
/* Destructor for channel data */
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {
channel_data *chand = elem->channel_data;
gpr_mu_destroy(&chand->mu);
grpc_load_reporting_config_destroy(chand->lrc);
}
static grpc_mdelem *lr_trailing_md_filter(void *user_data, grpc_mdelem *md) {
grpc_call_element *elem = user_data;
call_data *calld = elem->call_data;
if (md->key == GRPC_MDSTR_LOAD_REPORTING) {
calld->trailing_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value));
return NULL;
}
return md;
}
static void lr_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_transport_stream_op *op) {
GPR_TIMER_BEGIN("lr_start_transport_stream_op", 0);
if (op->send_trailing_metadata) {
grpc_metadata_batch_filter(op->send_trailing_metadata,
lr_trailing_md_filter, elem);
}
grpc_call_next_op(exec_ctx, elem, op);
GPR_TIMER_END("lr_start_transport_stream_op", 0);
}
const grpc_channel_filter grpc_load_reporting_filter = {
lr_start_transport_stream_op,
grpc_channel_next_op,
sizeof(call_data),
init_call_elem,
grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
"load_reporting"};

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -31,9 +31,11 @@
* *
*/ */
#ifndef GRPCXX_SUPPORT_CONFIG_PROTOBUF_H #ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H
#define GRPCXX_SUPPORT_CONFIG_PROTOBUF_H #define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H
#include <grpc++/impl/codegen/config_protobuf.h> #include "src/core/lib/channel/channel_stack.h"
#endif // GRPCXX_SUPPORT_CONFIG_PROTOBUF_H extern const grpc_channel_filter grpc_load_reporting_filter;
#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H */

@ -444,7 +444,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx,
void *arg_ignored) { void *arg_ignored) {
if (!t->closed) { if (!t->closed) {
t->closed = 1; t->closed = 1;
connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_FATAL_FAILURE, connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_SHUTDOWN,
"close_transport"); "close_transport");
if (t->ep) { if (t->ep) {
allow_endpoint_shutdown_locked(exec_ctx, t); allow_endpoint_shutdown_locked(exec_ctx, t);
@ -1428,13 +1428,13 @@ static void close_from_api(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(status >= 0 && (int)status < 100); GPR_ASSERT(status >= 0 && (int)status < 100);
GPR_ASSERT(stream_global->id != 0); if (stream_global->id != 0 && !transport_global->is_client) {
/* Hand roll a header block. /* Hand roll a header block.
This is unnecessarily ugly - at some point we should find a more elegant This is unnecessarily ugly - at some point we should find a more elegant
solution. solution.
It's complicated by the fact that our send machinery would be dead by the It's complicated by the fact that our send machinery would be dead by the
time we got around to sending this, so instead we ignore HPACK compression time we got around to sending this, so instead we ignore HPACK
compression
and just write the uncompressed bytes onto the wire. */ and just write the uncompressed bytes onto the wire. */
status_hdr = gpr_slice_malloc(15 + (status >= 10)); status_hdr = gpr_slice_malloc(15 + (status >= 10));
p = GPR_SLICE_START_PTR(status_hdr); p = GPR_SLICE_START_PTR(status_hdr);
@ -1515,6 +1515,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx,
if (optional_message) { if (optional_message) {
gpr_slice_ref(*optional_message); gpr_slice_ref(*optional_message);
} }
}
grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status,
optional_message); optional_message);
grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1,
@ -1734,6 +1736,13 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
add_to_pollset_locked, pollset, 0); add_to_pollset_locked, pollset, 0);
} }
static void set_pollset_set(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_stream *gs, grpc_pollset_set *pollset_set) {
grpc_chttp2_run_with_global_lock(exec_ctx, (grpc_chttp2_transport *)gt,
(grpc_chttp2_stream *)gs,
add_to_pollset_set_locked, pollset_set, 0);
}
/******************************************************************************* /*******************************************************************************
* BYTE STREAM * BYTE STREAM
*/ */
@ -2055,6 +2064,7 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream),
"chttp2", "chttp2",
init_stream, init_stream,
set_pollset, set_pollset,
set_pollset_set,
perform_stream_op, perform_stream_op,
perform_transport_op, perform_transport_op,
destroy_stream, destroy_stream,

@ -152,6 +152,10 @@ static void next_recv_step(stream_obj *s, enum e_caller caller);
static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_stream *gs, grpc_pollset *pollset) {} grpc_stream *gs, grpc_pollset *pollset) {}
static void set_pollset_set_do_nothing(grpc_exec_ctx *exec_ctx,
grpc_transport *gt, grpc_stream *gs,
grpc_pollset_set *pollset_set) {}
static void enqueue_callbacks(grpc_closure *callback_list[]) { static void enqueue_callbacks(grpc_closure *callback_list[]) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
if (callback_list[0]) { if (callback_list[0]) {
@ -646,7 +650,13 @@ static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) {
} }
} }
const grpc_transport_vtable grpc_cronet_vtable = { const grpc_transport_vtable grpc_cronet_vtable = {sizeof(stream_obj),
sizeof(stream_obj), "cronet_http", init_stream, "cronet_http",
set_pollset_do_nothing, perform_stream_op, NULL, init_stream,
destroy_stream, destroy_transport, NULL}; set_pollset_do_nothing,
set_pollset_set_do_nothing,
perform_stream_op,
NULL,
destroy_stream,
destroy_transport,
NULL};

@ -189,9 +189,9 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
} }
} }
void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_call_stack *call_stack, grpc_call_stack *call_stack,
grpc_pollset *pollset) { grpc_polling_entity *pollent) {
size_t count = call_stack->count; size_t count = call_stack->count;
grpc_call_element *call_elems; grpc_call_element *call_elems;
char *user_data; char *user_data;
@ -203,17 +203,19 @@ void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx,
/* init per-filter data */ /* init per-filter data */
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
call_elems[i].filter->set_pollset(exec_ctx, &call_elems[i], pollset); call_elems[i].filter->set_pollset_or_pollset_set(exec_ctx, &call_elems[i],
pollent);
user_data += user_data +=
ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data);
} }
} }
void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, void grpc_call_stack_ignore_set_pollset_or_pollset_set(
grpc_call_element *elem, grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_pollset *pollset) {} grpc_polling_entity *pollent) {}
void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
const grpc_call_stats *call_stats,
void *and_free_memory) { void *and_free_memory) {
grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack);
size_t count = stack->count; size_t count = stack->count;
@ -221,7 +223,7 @@ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
/* destroy per-filter data */ /* destroy per-filter data */
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], call_stats,
i == count - 1 ? and_free_memory : NULL); i == count - 1 ? and_free_memory : NULL);
} }
} }

@ -45,7 +45,10 @@
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/core/lib/debug/trace.h" #include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
typedef struct grpc_channel_element grpc_channel_element; typedef struct grpc_channel_element grpc_channel_element;
@ -67,6 +70,12 @@ typedef struct {
grpc_call_context_element *context; grpc_call_context_element *context;
} grpc_call_element_args; } grpc_call_element_args;
typedef struct {
grpc_transport_stream_stats transport_stream_stats;
gpr_timespec latency; /* From call creating to enqueing of received status */
grpc_status_code final_status;
} grpc_call_stats;
/* Channel filters specify: /* Channel filters specify:
1. the amount of memory needed in the channel & call (via the sizeof_XXX 1. the amount of memory needed in the channel & call (via the sizeof_XXX
members) members)
@ -101,14 +110,16 @@ typedef struct {
argument. */ argument. */
void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_call_element_args *args); grpc_call_element_args *args);
void (*set_pollset)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset); grpc_call_element *elem,
grpc_polling_entity *pollent);
/* Destroy per call data. /* Destroy per call data.
The filter does not need to do any chaining. The filter does not need to do any chaining.
The bottom filter of a stack will be passed a non-NULL pointer to The bottom filter of a stack will be passed a non-NULL pointer to
\a and_free_memory that should be passed to gpr_free when destruction \a and_free_memory that should be passed to gpr_free when destruction
is complete. */ is complete. */
void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_stats *stats,
void *and_free_memory); void *and_free_memory);
/* sizeof(per channel data) */ /* sizeof(per channel data) */
@ -201,10 +212,11 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
grpc_call_context_element *context, grpc_call_context_element *context,
const void *transport_server_data, const void *transport_server_data,
grpc_call_stack *call_stack); grpc_call_stack *call_stack);
/* Set a pollset for a call stack: must occur before the first op is started */ /* Set a pollset or a pollset_set for a call stack: must occur before the first
void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, * op is started */
void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_call_stack *call_stack, grpc_call_stack *call_stack,
grpc_pollset *pollset); grpc_polling_entity *pollent);
#ifdef GRPC_STREAM_REFCOUNT_DEBUG #ifdef GRPC_STREAM_REFCOUNT_DEBUG
#define GRPC_CALL_STACK_REF(call_stack, reason) \ #define GRPC_CALL_STACK_REF(call_stack, reason) \
@ -228,13 +240,14 @@ void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx,
/* Destroy a call stack */ /* Destroy a call stack */
void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack,
const grpc_call_stats *call_stats,
void *and_free_memory); void *and_free_memory);
/* Ignore set pollset - used by filters to implement the set_pollset method /* Ignore set pollset{_set} - used by filters if they don't care about pollsets
if they don't care about pollsets at all. Does nothing. */ * at all. Does nothing. */
void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, void grpc_call_stack_ignore_set_pollset_or_pollset_set(
grpc_call_element *elem, grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_pollset *pollset); grpc_polling_entity *pollent);
/* Call the next operation in a call stack */ /* Call the next operation in a call stack */
void grpc_call_next_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void grpc_call_next_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_transport_stream_op *op); grpc_transport_stream_op *op);

@ -271,7 +271,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
void *ignored) { const grpc_call_stats *stats, void *ignored) {
/* grab pointers to our data from the call element */ /* grab pointers to our data from the call element */
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
gpr_slice_buffer_destroy(&calld->slices); gpr_slice_buffer_destroy(&calld->slices);
@ -325,7 +325,7 @@ const grpc_channel_filter grpc_compress_filter = {
grpc_channel_next_op, grpc_channel_next_op,
sizeof(call_data), sizeof(call_data),
init_call_elem, init_call_elem,
grpc_call_stack_ignore_set_pollset, grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem, destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -93,16 +93,18 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
GPR_ASSERT(r == 0); GPR_ASSERT(r == 0);
} }
static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset) { grpc_call_element *elem,
grpc_polling_entity *pollent) {
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
grpc_transport_set_pollset(exec_ctx, chand->transport, grpc_transport_set_pops(exec_ctx, chand->transport,
TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollset); TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollent);
} }
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_stats *stats,
void *and_free_memory) { void *and_free_memory) {
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
@ -137,7 +139,7 @@ static const grpc_channel_filter connected_channel_filter = {
con_start_transport_op, con_start_transport_op,
sizeof(call_data), sizeof(call_data),
init_call_elem, init_call_elem,
set_pollset, set_pollset_or_pollset_set,
destroy_call_elem, destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -156,7 +156,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
void *ignored) {} const grpc_call_stats *stats, void *ignored) {}
static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) {
unsigned i; unsigned i;
@ -250,7 +250,7 @@ const grpc_channel_filter grpc_http_client_filter = {
grpc_channel_next_op, grpc_channel_next_op,
sizeof(call_data), sizeof(call_data),
init_call_elem, init_call_elem,
grpc_call_stack_ignore_set_pollset, grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem, destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -226,7 +226,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
void *ignored) {} const grpc_call_stats *stats, void *ignored) {}
/* Constructor for channel_data */ /* Constructor for channel_data */
static void init_channel_elem(grpc_exec_ctx *exec_ctx, static void init_channel_elem(grpc_exec_ctx *exec_ctx,
@ -244,7 +244,7 @@ const grpc_channel_filter grpc_http_server_filter = {
grpc_channel_next_op, grpc_channel_next_op,
sizeof(call_data), sizeof(call_data),
init_call_elem, init_call_elem,
grpc_call_stack_ignore_set_pollset, grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem, destroy_call_elem,
sizeof(channel_data), sizeof(channel_data),
init_channel_elem, init_channel_elem,

@ -62,7 +62,7 @@ typedef struct {
grpc_httpcli_response_cb on_response; grpc_httpcli_response_cb on_response;
void *user_data; void *user_data;
grpc_httpcli_context *context; grpc_httpcli_context *context;
grpc_pollset *pollset; grpc_polling_entity *pollent;
grpc_iomgr_object iomgr_obj; grpc_iomgr_object iomgr_obj;
gpr_slice_buffer incoming; gpr_slice_buffer incoming;
gpr_slice_buffer outgoing; gpr_slice_buffer outgoing;
@ -97,8 +97,8 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req);
static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, static void finish(grpc_exec_ctx *exec_ctx, internal_request *req,
int success) { int success) {
grpc_pollset_set_del_pollset(exec_ctx, req->context->pollset_set, grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent,
req->pollset); req->context->pollset_set);
req->on_response(exec_ctx, req->user_data, req->on_response(exec_ctx, req->user_data,
success ? &req->parser.http.response : NULL); success ? &req->parser.http.response : NULL);
grpc_http_parser_destroy(&req->parser); grpc_http_parser_destroy(&req->parser);
@ -222,7 +222,7 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
static void internal_request_begin( static void internal_request_begin(
grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset, const grpc_httpcli_request *request, grpc_polling_entity *pollent, const grpc_httpcli_request *request,
gpr_timespec deadline, grpc_httpcli_response_cb on_response, gpr_timespec deadline, grpc_httpcli_response_cb on_response,
void *user_data, const char *name, gpr_slice request_text) { void *user_data, const char *name, gpr_slice request_text) {
internal_request *req = gpr_malloc(sizeof(internal_request)); internal_request *req = gpr_malloc(sizeof(internal_request));
@ -235,7 +235,7 @@ static void internal_request_begin(
req->handshaker = req->handshaker =
request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; request->handshaker ? request->handshaker : &grpc_httpcli_plaintext;
req->context = context; req->context = context;
req->pollset = pollset; req->pollent = pollent;
grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->on_read, on_read, req);
grpc_closure_init(&req->done_write, done_write, req); grpc_closure_init(&req->done_write, done_write, req);
gpr_slice_buffer_init(&req->incoming); gpr_slice_buffer_init(&req->incoming);
@ -244,14 +244,15 @@ static void internal_request_begin(
req->host = gpr_strdup(request->host); req->host = gpr_strdup(request->host);
req->ssl_host_override = gpr_strdup(request->ssl_host_override); req->ssl_host_override = gpr_strdup(request->ssl_host_override);
grpc_pollset_set_add_pollset(exec_ctx, req->context->pollset_set, GPR_ASSERT(pollent);
req->pollset); grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent,
req->context->pollset_set);
grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port,
on_resolved, req); on_resolved, req);
} }
void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset, grpc_polling_entity *pollent,
const grpc_httpcli_request *request, const grpc_httpcli_request *request,
gpr_timespec deadline, gpr_timespec deadline,
grpc_httpcli_response_cb on_response, void *user_data) { grpc_httpcli_response_cb on_response, void *user_data) {
@ -261,14 +262,14 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
return; return;
} }
gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path);
internal_request_begin(exec_ctx, context, pollset, request, deadline, internal_request_begin(exec_ctx, context, pollent, request, deadline,
on_response, user_data, name, on_response, user_data, name,
grpc_httpcli_format_get_request(request)); grpc_httpcli_format_get_request(request));
gpr_free(name); gpr_free(name);
} }
void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset, grpc_polling_entity *pollent,
const grpc_httpcli_request *request, const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size, const char *body_bytes, size_t body_size,
gpr_timespec deadline, gpr_timespec deadline,
@ -281,7 +282,7 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
} }
gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path);
internal_request_begin( internal_request_begin(
exec_ctx, context, pollset, request, deadline, on_response, user_data, exec_ctx, context, pollent, request, deadline, on_response, user_data,
name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); name, grpc_httpcli_format_post_request(request, body_bytes, body_size));
gpr_free(name); gpr_free(name);
} }

@ -41,6 +41,7 @@
#include "src/core/lib/http/parser.h" #include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/pollset_set.h"
/* User agent this library reports */ /* User agent this library reports */
@ -100,7 +101,7 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context);
'on_response' is a callback to report results to (and 'user_data' is a user 'on_response' is a callback to report results to (and 'user_data' is a user
supplied pointer to pass to said call) */ supplied pointer to pass to said call) */
void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset, grpc_polling_entity *pollent,
const grpc_httpcli_request *request, const grpc_httpcli_request *request,
gpr_timespec deadline, gpr_timespec deadline,
grpc_httpcli_response_cb on_response, void *user_data); grpc_httpcli_response_cb on_response, void *user_data);
@ -121,7 +122,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
supplied pointer to pass to said call) supplied pointer to pass to said call)
Does not support ?var1=val1&var2=val2 in the path. */ Does not support ?var1=val1&var2=val2 in the path. */
void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_pollset *pollset, grpc_polling_entity *pollent,
const grpc_httpcli_request *request, const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size, const char *body_bytes, size_t body_size,
gpr_timespec deadline, gpr_timespec deadline,

@ -39,7 +39,7 @@
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/thd.h> #include <grpc/support/thd.h>
#include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iocp_windows.h"

@ -35,7 +35,7 @@
#ifdef GPR_WINSOCK_SOCKET #ifdef GPR_WINSOCK_SOCKET
#include "src/core/lib/iomgr/sockaddr_win32.h" #include "src/core/lib/iomgr/sockaddr_windows.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>

@ -0,0 +1,104 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/iomgr/polling_entity.h"
grpc_polling_entity grpc_polling_entity_create_from_pollset_set(
grpc_pollset_set *pollset_set) {
grpc_polling_entity pollent;
pollent.pollent.pollset_set = pollset_set;
pollent.tag = POPS_POLLSET_SET;
return pollent;
}
grpc_polling_entity grpc_polling_entity_create_from_pollset(
grpc_pollset *pollset) {
grpc_polling_entity pollent;
pollent.pollent.pollset = pollset;
pollent.tag = POPS_POLLSET;
return pollent;
}
grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent) {
if (pollent->tag == POPS_POLLSET) {
return pollent->pollent.pollset;
}
return NULL;
}
grpc_pollset_set *grpc_polling_entity_pollset_set(
grpc_polling_entity *pollent) {
if (pollent->tag == POPS_POLLSET_SET) {
return pollent->pollent.pollset_set;
}
return NULL;
}
bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent) {
return pollent->tag == POPS_NONE;
}
void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_pollset_set *pss_dst) {
if (pollent->tag == POPS_POLLSET) {
GPR_ASSERT(pollent->pollent.pollset != NULL);
grpc_pollset_set_add_pollset(exec_ctx, pss_dst, pollent->pollent.pollset);
} else if (pollent->tag == POPS_POLLSET_SET) {
GPR_ASSERT(pollent->pollent.pollset_set != NULL);
grpc_pollset_set_add_pollset_set(exec_ctx, pss_dst,
pollent->pollent.pollset_set);
} else {
gpr_log(GPR_ERROR, "Invalid grpc_polling_entity tag '%d'", pollent->tag);
abort();
}
}
void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_pollset_set *pss_dst) {
if (pollent->tag == POPS_POLLSET) {
GPR_ASSERT(pollent->pollent.pollset != NULL);
grpc_pollset_set_del_pollset(exec_ctx, pss_dst, pollent->pollent.pollset);
} else if (pollent->tag == POPS_POLLSET_SET) {
GPR_ASSERT(pollent->pollent.pollset_set != NULL);
grpc_pollset_set_del_pollset_set(exec_ctx, pss_dst,
pollent->pollent.pollset_set);
} else {
gpr_log(GPR_ERROR, "Invalid grpc_polling_entity tag '%d'", pollent->tag);
abort();
}
}

@ -0,0 +1,81 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H
#define GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
/* A grpc_polling_entity is a pollset-or-pollset_set container. It allows
* functions that
* accept a pollset XOR a pollset_set to do so through an abstract interface.
* No ownership is taken. */
typedef struct grpc_polling_entity {
union {
grpc_pollset *pollset;
grpc_pollset_set *pollset_set;
} pollent;
enum pops_tag { POPS_NONE, POPS_POLLSET, POPS_POLLSET_SET } tag;
} grpc_polling_entity;
grpc_polling_entity grpc_polling_entity_create_from_pollset_set(
grpc_pollset_set *pollset_set);
grpc_polling_entity grpc_polling_entity_create_from_pollset(
grpc_pollset *pollset);
/** If \a pollent contains a pollset, return it. Otherwise, return NULL */
grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent);
/** If \a pollent contains a pollset_set, return it. Otherwise, return NULL */
grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent);
bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent);
/** Add the pollset or pollset_set in \a pollent to the destination pollset_set
* \a
* pss_dst */
void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_pollset_set *pss_dst);
/** Delete the pollset or pollset_set in \a pollent from the destination
* pollset_set \a
* pss_dst */
void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_pollset_set *pss_dst);
/* pollset_set specific */
#endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */

@ -32,12 +32,15 @@
*/ */
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#include <stdint.h>
#ifdef GPR_WINSOCK_SOCKET #ifdef GPR_WINSOCK_SOCKET
#include "src/core/lib/iomgr/pollset_set_windows.h" #include "src/core/lib/iomgr/pollset_set_windows.h"
grpc_pollset_set* grpc_pollset_set_create(void) { return NULL; } grpc_pollset_set* grpc_pollset_set_create(void) {
return (grpc_pollset_set*)((intptr_t)0xdeafbeef);
}
void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {} void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {}

@ -43,7 +43,7 @@
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/host_port.h> #include <grpc/support/host_port.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include <grpc/support/thd.h> #include <grpc/support/thd.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -36,8 +36,8 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32 #ifdef GPR_WINDOWS
#include "src/core/lib/iomgr/sockaddr_win32.h" #include "src/core/lib/iomgr/sockaddr_windows.h"
#endif #endif
#ifdef GPR_POSIX_SOCKETADDR #ifdef GPR_POSIX_SOCKETADDR

@ -31,8 +31,8 @@
* *
*/ */
#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H
#define GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
@ -40,4 +40,4 @@
// must be included after the above // must be included after the above
#include <mswsock.h> #include <mswsock.h>
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H */ #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */

@ -42,7 +42,7 @@
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iocp_windows.h"

@ -35,11 +35,11 @@
#ifdef GPR_WINSOCK_SOCKET #ifdef GPR_WINSOCK_SOCKET
#include "src/core/lib/iomgr/sockaddr_win32.h" #include "src/core/lib/iomgr/sockaddr_windows.h"
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/slice_buffer.h> #include <grpc/support/slice_buffer.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>

@ -41,7 +41,7 @@
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include <grpc/support/sync.h> #include <grpc/support/sync.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>

@ -37,11 +37,11 @@
#include <limits.h> #include <limits.h>
#include "src/core/lib/iomgr/sockaddr_win32.h" #include "src/core/lib/iomgr/sockaddr_windows.h"
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/slice_buffer.h> #include <grpc/support/slice_buffer.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>

@ -278,8 +278,8 @@ static int refill_queue(shard_type *shard, gpr_timespec now) {
return !grpc_timer_heap_is_empty(&shard->heap); return !grpc_timer_heap_is_empty(&shard->heap);
} }
/* This pops the next non-cancelled timer with deadline <= now from the queue, /* This pops the next non-cancelled timer with deadline <= now from the
or returns NULL if there isn't one. queue, or returns NULL if there isn't one.
REQUIRES: shard->mu locked */ REQUIRES: shard->mu locked */
static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) { static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) {
grpc_timer *timer; grpc_timer *timer;

@ -43,7 +43,7 @@
#include "src/core/lib/iomgr/workqueue_posix.h" #include "src/core/lib/iomgr/workqueue_posix.h"
#endif #endif
#ifdef GPR_WIN32 #ifdef GPR_WINDOWS
#include "src/core/lib/iomgr/workqueue_windows.h" #include "src/core/lib/iomgr/workqueue_windows.h"
#endif #endif

@ -33,8 +33,8 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32 #ifdef GPR_WINDOWS
#include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/iomgr/workqueue.h"
#endif /* GPR_WIN32 */ #endif /* GPR_WINDOWS */

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -35,6 +35,7 @@
#include <string.h> #include <string.h>
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/api_trace.h"
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
@ -49,7 +50,7 @@ typedef struct {
grpc_credentials_md_store *md_elems; grpc_credentials_md_store *md_elems;
grpc_auth_metadata_context auth_md_context; grpc_auth_metadata_context auth_md_context;
void *user_data; void *user_data;
grpc_pollset *pollset; grpc_polling_entity *pollent;
grpc_credentials_metadata_cb cb; grpc_credentials_metadata_cb cb;
} grpc_composite_call_credentials_metadata_context; } grpc_composite_call_credentials_metadata_context;
@ -93,7 +94,7 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data,
grpc_call_credentials *inner_creds = grpc_call_credentials *inner_creds =
ctx->composite_creds->inner.creds_array[ctx->creds_index++]; ctx->composite_creds->inner.creds_array[ctx->creds_index++];
grpc_call_credentials_get_request_metadata( grpc_call_credentials_get_request_metadata(
exec_ctx, inner_creds, ctx->pollset, ctx->auth_md_context, exec_ctx, inner_creds, ctx->pollent, ctx->auth_md_context,
composite_call_metadata_cb, ctx); composite_call_metadata_cb, ctx);
return; return;
} }
@ -106,7 +107,7 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data,
static void composite_call_get_request_metadata( static void composite_call_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context auth_md_context, grpc_polling_entity *pollent, grpc_auth_metadata_context auth_md_context,
grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_cb cb, void *user_data) {
grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds;
grpc_composite_call_credentials_metadata_context *ctx; grpc_composite_call_credentials_metadata_context *ctx;
@ -117,10 +118,10 @@ static void composite_call_get_request_metadata(
ctx->user_data = user_data; ctx->user_data = user_data;
ctx->cb = cb; ctx->cb = cb;
ctx->composite_creds = c; ctx->composite_creds = c;
ctx->pollset = pollset; ctx->pollent = pollent;
ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds);
grpc_call_credentials_get_request_metadata( grpc_call_credentials_get_request_metadata(
exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, exec_ctx, c->inner.creds_array[ctx->creds_index++], ctx->pollent,
auth_md_context, composite_call_metadata_cb, ctx); auth_md_context, composite_call_metadata_cb, ctx);
} }

@ -111,7 +111,7 @@ void grpc_call_credentials_release(grpc_call_credentials *creds) {
void grpc_call_credentials_get_request_metadata( void grpc_call_credentials_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_polling_entity *pollent, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_cb cb, void *user_data) {
if (creds == NULL || creds->vtable->get_request_metadata == NULL) { if (creds == NULL || creds->vtable->get_request_metadata == NULL) {
if (cb != NULL) { if (cb != NULL) {
@ -119,7 +119,7 @@ void grpc_call_credentials_get_request_metadata(
} }
return; return;
} }
creds->vtable->get_request_metadata(exec_ctx, creds, pollset, context, cb, creds->vtable->get_request_metadata(exec_ctx, creds, pollent, context, cb,
user_data); user_data);
} }

@ -41,6 +41,7 @@
#include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h" #include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/security/transport/security_connector.h"
struct grpc_http_response; struct grpc_http_response;
@ -164,7 +165,8 @@ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx,
typedef struct { typedef struct {
void (*destruct)(grpc_call_credentials *c); void (*destruct)(grpc_call_credentials *c);
void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, void (*get_request_metadata)(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *c, grpc_pollset *pollset, grpc_call_credentials *c,
grpc_polling_entity *pollent,
grpc_auth_metadata_context context, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, grpc_credentials_metadata_cb cb,
void *user_data); void *user_data);
@ -180,7 +182,7 @@ grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds);
void grpc_call_credentials_unref(grpc_call_credentials *creds); void grpc_call_credentials_unref(grpc_call_credentials *creds);
void grpc_call_credentials_get_request_metadata( void grpc_call_credentials_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_polling_entity *pollent, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, void *user_data); grpc_credentials_metadata_cb cb, void *user_data);
/* Metadata-only credentials with the specified key and value where /* Metadata-only credentials with the specified key and value where

@ -106,7 +106,7 @@ static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx,
static void md_only_test_get_request_metadata( static void md_only_test_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_polling_entity *pollent, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_cb cb, void *user_data) {
grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds;

@ -33,7 +33,7 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32 #ifdef GPR_WINDOWS
#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include "src/core/lib/security/credentials/google_default/google_default_credentials.h"
@ -58,4 +58,4 @@ char *grpc_get_well_known_google_credentials_file_path_impl(void) {
return result; return result;
} }
#endif /* GPR_WIN32 */ #endif /* GPR_WINDOWS */

@ -41,6 +41,7 @@
#include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h" #include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/support/env.h" #include "src/core/lib/support/env.h"
@ -62,7 +63,7 @@ static gpr_once g_once = GPR_ONCE_INIT;
static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); } static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); }
typedef struct { typedef struct {
grpc_pollset *pollset; grpc_polling_entity pollent;
int is_done; int is_done;
int success; int success;
} compute_engine_detector; } compute_engine_detector;
@ -86,7 +87,7 @@ static void on_compute_engine_detection_http_response(
} }
gpr_mu_lock(g_polling_mu); gpr_mu_lock(g_polling_mu);
detector->is_done = 1; detector->is_done = 1;
grpc_pollset_kick(detector->pollset, NULL); grpc_pollset_kick(grpc_polling_entity_pollset(&detector->pollent), NULL);
gpr_mu_unlock(g_polling_mu); gpr_mu_unlock(g_polling_mu);
} }
@ -105,8 +106,9 @@ static int is_stack_running_on_compute_engine(void) {
on compute engine. */ on compute engine. */
gpr_timespec max_detection_delay = gpr_time_from_seconds(1, GPR_TIMESPAN); gpr_timespec max_detection_delay = gpr_time_from_seconds(1, GPR_TIMESPAN);
detector.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset_init(detector.pollset, &g_polling_mu); grpc_pollset_init(pollset, &g_polling_mu);
detector.pollent = grpc_polling_entity_create_from_pollset(pollset);
detector.is_done = 0; detector.is_done = 0;
detector.success = 0; detector.success = 0;
@ -117,7 +119,7 @@ static int is_stack_running_on_compute_engine(void) {
grpc_httpcli_context_init(&context); grpc_httpcli_context_init(&context);
grpc_httpcli_get( grpc_httpcli_get(
&exec_ctx, &context, detector.pollset, &request, &exec_ctx, &context, &detector.pollent, &request,
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay),
on_compute_engine_detection_http_response, &detector); on_compute_engine_detection_http_response, &detector);
@ -128,19 +130,22 @@ static int is_stack_running_on_compute_engine(void) {
gpr_mu_lock(g_polling_mu); gpr_mu_lock(g_polling_mu);
while (!detector.is_done) { while (!detector.is_done) {
grpc_pollset_worker *worker = NULL; grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, detector.pollset, &worker, grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent),
gpr_now(GPR_CLOCK_MONOTONIC), &worker, gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_inf_future(GPR_CLOCK_MONOTONIC));
} }
gpr_mu_unlock(g_polling_mu); gpr_mu_unlock(g_polling_mu);
grpc_httpcli_context_destroy(&context); grpc_httpcli_context_destroy(&context);
grpc_closure_init(&destroy_closure, destroy_pollset, detector.pollset); grpc_closure_init(&destroy_closure, destroy_pollset,
grpc_pollset_shutdown(&exec_ctx, detector.pollset, &destroy_closure); grpc_polling_entity_pollset(&detector.pollent));
grpc_pollset_shutdown(&exec_ctx,
grpc_polling_entity_pollset(&detector.pollent),
&destroy_closure);
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
g_polling_mu = NULL; g_polling_mu = NULL;
gpr_free(detector.pollset); gpr_free(grpc_polling_entity_pollset(&detector.pollent));
return detector.success; return detector.success;
} }

@ -49,7 +49,7 @@ static void iam_destruct(grpc_call_credentials *creds) {
static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *creds, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_auth_metadata_context context, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, grpc_credentials_metadata_cb cb,
void *user_data) { void *user_data) {

@ -64,7 +64,7 @@ static void jwt_destruct(grpc_call_credentials *creds) {
static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *creds, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_auth_metadata_context context, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, grpc_credentials_metadata_cb cb,
void *user_data) { void *user_data) {

@ -37,6 +37,7 @@
#include <string.h> #include <string.h>
#include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/httpcli.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/util/b64.h" #include "src/core/lib/security/util/b64.h"
#include "src/core/lib/tsi/ssl_types.h" #include "src/core/lib/tsi/ssl_types.h"
@ -321,7 +322,7 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims,
typedef struct { typedef struct {
grpc_jwt_verifier *verifier; grpc_jwt_verifier *verifier;
grpc_pollset *pollset; grpc_polling_entity pollent;
jose_header *header; jose_header *header;
grpc_jwt_claims *claims; grpc_jwt_claims *claims;
char *audience; char *audience;
@ -337,10 +338,11 @@ static verifier_cb_ctx *verifier_cb_ctx_create(
grpc_jwt_claims *claims, const char *audience, gpr_slice signature, grpc_jwt_claims *claims, const char *audience, gpr_slice signature,
const char *signed_jwt, size_t signed_jwt_len, void *user_data, const char *signed_jwt, size_t signed_jwt_len, void *user_data,
grpc_jwt_verification_done_cb cb) { grpc_jwt_verification_done_cb cb) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx));
memset(ctx, 0, sizeof(verifier_cb_ctx)); memset(ctx, 0, sizeof(verifier_cb_ctx));
ctx->verifier = verifier; ctx->verifier = verifier;
ctx->pollset = pollset; ctx->pollent = grpc_polling_entity_create_from_pollset(pollset);
ctx->header = header; ctx->header = header;
ctx->audience = gpr_strdup(audience); ctx->audience = gpr_strdup(audience);
ctx->claims = claims; ctx->claims = claims;
@ -348,6 +350,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create(
ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len);
ctx->user_data = user_data; ctx->user_data = user_data;
ctx->user_cb = cb; ctx->user_cb = cb;
grpc_exec_ctx_finish(&exec_ctx);
return ctx; return ctx;
} }
@ -642,7 +645,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data,
*(req.host + (req.http.path - jwks_uri)) = '\0'; *(req.host + (req.http.path - jwks_uri)) = '\0';
} }
grpc_httpcli_get( grpc_httpcli_get(
exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, &req,
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay),
on_keys_retrieved, ctx); on_keys_retrieved, ctx);
grpc_json_destroy(json); grpc_json_destroy(json);
@ -745,7 +748,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx,
} }
grpc_httpcli_get( grpc_httpcli_get(
exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, &req,
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay),
http_cb, ctx); http_cb, ctx);
gpr_free(req.host); gpr_free(req.host);

@ -244,7 +244,7 @@ static void on_oauth2_token_fetcher_http_response(
static void oauth2_token_fetcher_get_request_metadata( static void oauth2_token_fetcher_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_polling_entity *pollent, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_cb cb, void *user_data) {
grpc_oauth2_token_fetcher_credentials *c = grpc_oauth2_token_fetcher_credentials *c =
(grpc_oauth2_token_fetcher_credentials *)creds; (grpc_oauth2_token_fetcher_credentials *)creds;
@ -270,7 +270,7 @@ static void oauth2_token_fetcher_get_request_metadata(
c->fetch_func( c->fetch_func(
exec_ctx, exec_ctx,
grpc_credentials_metadata_request_create(creds, cb, user_data), grpc_credentials_metadata_request_create(creds, cb, user_data),
&c->httpcli_context, pollset, on_oauth2_token_fetcher_http_response, &c->httpcli_context, pollent, on_oauth2_token_fetcher_http_response,
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold)); gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold));
} }
} }
@ -295,7 +295,7 @@ static grpc_call_credentials_vtable compute_engine_vtable = {
static void compute_engine_fetch_oauth2( static void compute_engine_fetch_oauth2(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req,
grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent,
grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_httpcli_response_cb response_cb, gpr_timespec deadline) {
grpc_http_header header = {"Metadata-Flavor", "Google"}; grpc_http_header header = {"Metadata-Flavor", "Google"};
grpc_httpcli_request request; grpc_httpcli_request request;
@ -304,7 +304,7 @@ static void compute_engine_fetch_oauth2(
request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH;
request.http.hdr_count = 1; request.http.hdr_count = 1;
request.http.hdrs = &header; request.http.hdrs = &header;
grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, grpc_httpcli_get(exec_ctx, httpcli_context, pollent, &request, deadline,
response_cb, metadata_req); response_cb, metadata_req);
} }
@ -336,7 +336,7 @@ static grpc_call_credentials_vtable refresh_token_vtable = {
static void refresh_token_fetch_oauth2( static void refresh_token_fetch_oauth2(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req,
grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent,
grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_httpcli_response_cb response_cb, gpr_timespec deadline) {
grpc_google_refresh_token_credentials *c = grpc_google_refresh_token_credentials *c =
(grpc_google_refresh_token_credentials *)metadata_req->creds; (grpc_google_refresh_token_credentials *)metadata_req->creds;
@ -353,7 +353,7 @@ static void refresh_token_fetch_oauth2(
request.http.hdr_count = 1; request.http.hdr_count = 1;
request.http.hdrs = &header; request.http.hdrs = &header;
request.handshaker = &grpc_httpcli_ssl; request.handshaker = &grpc_httpcli_ssl;
grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, grpc_httpcli_post(exec_ctx, httpcli_context, pollent, &request, body,
strlen(body), deadline, response_cb, metadata_req); strlen(body), deadline, response_cb, metadata_req);
gpr_free(body); gpr_free(body);
} }
@ -396,7 +396,7 @@ static void access_token_destruct(grpc_call_credentials *creds) {
static void access_token_get_request_metadata( static void access_token_get_request_metadata(
grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_polling_entity *pollent, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_cb cb, void *user_data) {
grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds;
cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK);

@ -70,7 +70,7 @@ void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token);
typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx,
grpc_credentials_metadata_request *req, grpc_credentials_metadata_request *req,
grpc_httpcli_context *http_context, grpc_httpcli_context *http_context,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_httpcli_response_cb response_cb, grpc_httpcli_response_cb response_cb,
gpr_timespec deadline); gpr_timespec deadline);
typedef struct { typedef struct {

@ -94,7 +94,7 @@ static void plugin_md_request_metadata_ready(void *request,
static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *creds, grpc_call_credentials *creds,
grpc_pollset *pollset, grpc_polling_entity *pollent,
grpc_auth_metadata_context context, grpc_auth_metadata_context context,
grpc_credentials_metadata_cb cb, grpc_credentials_metadata_cb cb,
void *user_data) { void *user_data) {

@ -54,11 +54,11 @@ typedef struct {
grpc_call_credentials *creds; grpc_call_credentials *creds;
grpc_mdstr *host; grpc_mdstr *host;
grpc_mdstr *method; grpc_mdstr *method;
/* pollset bound to this call; if we need to make external /* pollset{_set} bound to this call; if we need to make external
network requests, they should be done under this pollset network requests, they should be done under a pollset added to this
so that work can progress when this call wants work to pollset_set so that work can progress when this call wants work to progress
progress */ */
grpc_pollset *pollset; grpc_polling_entity *pollent;
grpc_transport_stream_op op; grpc_transport_stream_op op;
uint8_t security_context_set; uint8_t security_context_set;
grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT]; grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT];
@ -184,9 +184,9 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx,
build_auth_metadata_context(&chand->security_connector->base, build_auth_metadata_context(&chand->security_connector->base,
chand->auth_context, calld); chand->auth_context, calld);
calld->op = *op; /* Copy op (originates from the caller's stack). */ calld->op = *op; /* Copy op (originates from the caller's stack). */
GPR_ASSERT(calld->pollset); GPR_ASSERT(calld->pollent != NULL);
grpc_call_credentials_get_request_metadata( grpc_call_credentials_get_request_metadata(
exec_ctx, calld->creds, calld->pollset, calld->auth_md_context, exec_ctx, calld->creds, calld->pollent, calld->auth_md_context,
on_credentials_metadata, elem); on_credentials_metadata, elem);
} }
@ -270,15 +270,16 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
memset(calld, 0, sizeof(*calld)); memset(calld, 0, sizeof(*calld));
} }
static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset) { grpc_call_element *elem,
grpc_polling_entity *pollent) {
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
calld->pollset = pollset; calld->pollent = pollent;
} }
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
void *ignored) { const grpc_call_stats *stats, void *ignored) {
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
grpc_call_credentials_unref(calld->creds); grpc_call_credentials_unref(calld->creds);
if (calld->host != NULL) { if (calld->host != NULL) {
@ -329,8 +330,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "client_auth_filter"); GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "client_auth_filter");
} }
const grpc_channel_filter grpc_client_auth_filter = { const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op,
auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), grpc_channel_next_op,
init_call_elem, set_pollset, destroy_call_elem, sizeof(call_data),
sizeof(channel_data), init_channel_elem, destroy_channel_elem, init_call_elem,
grpc_call_next_get_peer, "client-auth"}; set_pollset_or_pollset_set,
destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
"client-auth"};

@ -220,12 +220,9 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_server_security_context_destroy; grpc_server_security_context_destroy;
} }
static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_pollset *pollset) {}
/* Destructor for call_data */ /* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
void *ignored) {} const grpc_call_stats *stats, void *ignored) {}
/* Constructor for channel_data */ /* Constructor for channel_data */
static void init_channel_elem(grpc_exec_ctx *exec_ctx, static void init_channel_elem(grpc_exec_ctx *exec_ctx,
@ -258,7 +255,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
} }
const grpc_channel_filter grpc_server_auth_filter = { const grpc_channel_filter grpc_server_auth_filter = {
auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), auth_start_transport_op,
init_call_elem, set_pollset, destroy_call_elem, grpc_channel_next_op,
sizeof(channel_data), init_channel_elem, destroy_channel_elem, sizeof(call_data),
grpc_call_next_get_peer, "server-auth"}; init_call_elem,
grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
"server-auth"};

@ -33,7 +33,7 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32 #ifdef GPR_WINDOWS
#include <grpc/support/log.h> #include <grpc/support/log.h>
unsigned gpr_cpu_num_cores(void) { unsigned gpr_cpu_num_cores(void) {
@ -44,4 +44,4 @@ unsigned gpr_cpu_num_cores(void) {
unsigned gpr_cpu_current_cpu(void) { return GetCurrentProcessorNumber(); } unsigned gpr_cpu_current_cpu(void) { return GetCurrentProcessorNumber(); }
#endif /* GPR_WIN32 */ #endif /* GPR_WINDOWS */

@ -33,13 +33,13 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32_ENV #ifdef GPR_WINDOWS_ENV
#include <windows.h> #include <windows.h>
#include "src/core/lib/support/env.h" #include "src/core/lib/support/env.h"
#include "src/core/lib/support/string.h" #include "src/core/lib/support/string.h"
#include "src/core/lib/support/string_win32.h" #include "src/core/lib/support/string_windows.h"
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -76,4 +76,4 @@ void gpr_setenv(const char *name, const char *value) {
GPR_ASSERT(res); GPR_ASSERT(res);
} }
#endif /* GPR_WIN32_ENV */ #endif /* GPR_WINDOWS_ENV */

@ -33,19 +33,19 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#ifdef GPR_WIN32_LOG #ifdef GPR_WINDOWS_LOG
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/log_win32.h> #include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>
#include "src/core/lib/support/string.h" #include "src/core/lib/support/string.h"
#include "src/core/lib/support/string_win32.h" #include "src/core/lib/support/string_windows.h"
void gpr_log(const char *file, int line, gpr_log_severity severity, void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) { const char *format, ...) {
@ -109,4 +109,4 @@ void gpr_default_log(gpr_log_func_args *args) {
fflush(stderr); fflush(stderr);
} }
#endif /* GPR_WIN32_LOG */ #endif /* GPR_WINDOWS_LOG */

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

Loading…
Cancel
Save