Merge branch 'master' into unusedarg

pull/20111/head
Yash Tibrewal 5 years ago
commit 6593168380
  1. 2
      .github/ISSUE_TEMPLATE/bug_report.md
  2. 2
      .github/ISSUE_TEMPLATE/cleanup_request.md
  3. 2
      .github/ISSUE_TEMPLATE/feature_request.md
  4. 2
      .github/pull_request_template.md
  5. 59
      .github/stale.yml
  6. 3
      .gitmodules
  7. 38
      BUILD
  8. 8
      BUILD.gn
  9. 1139
      CMakeLists.txt
  10. 563
      Makefile
  11. 18
      bazel/grpc_build_system.bzl
  12. 21
      bazel/grpc_deps.bzl
  13. 9
      bazel/grpc_python_deps.bzl
  14. 45
      bazel/python_rules.bzl
  15. 50
      build.yaml
  16. 33
      config.m4
  17. 32
      config.w32
  18. 4
      doc/interop-test-descriptions.md
  19. 3
      examples/python/auth/BUILD.bazel
  20. 3
      examples/python/cancellation/BUILD.bazel
  21. 3
      examples/python/compression/BUILD.bazel
  22. 3
      examples/python/debug/BUILD.bazel
  23. 9
      examples/python/debug/get_stats.py
  24. 1
      examples/python/errors/BUILD.bazel
  25. 3
      examples/python/multiprocessing/BUILD
  26. 1
      examples/python/wait_for_ready/BUILD.bazel
  27. 84
      gRPC-Core.podspec
  28. 56
      grpc.gemspec
  29. 87
      grpc.gyp
  30. 3
      include/grpc/impl/codegen/port_platform.h
  31. 2
      include/grpcpp/impl/codegen/async_generic_service.h
  32. 6
      include/grpcpp/impl/codegen/async_stream_impl.h
  33. 8
      include/grpcpp/impl/codegen/async_unary_call_impl.h
  34. 38
      include/grpcpp/impl/codegen/call_op_set.h
  35. 4
      include/grpcpp/impl/codegen/callback_common.h
  36. 8
      include/grpcpp/impl/codegen/channel_interface.h
  37. 44
      include/grpcpp/impl/codegen/client_callback_impl.h
  38. 4
      include/grpcpp/impl/codegen/interceptor_common.h
  39. 8
      include/grpcpp/impl/codegen/method_handler_impl.h
  40. 4
      include/grpcpp/impl/codegen/rpc_service_method.h
  41. 25
      include/grpcpp/impl/codegen/server_callback_impl.h
  42. 2
      include/grpcpp/impl/codegen/server_interface.h
  43. 2
      include/grpcpp/impl/codegen/time.h
  44. 4
      include/grpcpp/impl/server_builder_plugin.h
  45. 4
      include/grpcpp/security/credentials_impl.h
  46. 8
      include/grpcpp/server_impl.h
  47. 2
      include/grpcpp/support/channel_arguments_impl.h
  48. 56
      package.xml
  49. 85
      src/compiler/cpp_generator.cc
  50. 100
      src/compiler/csharp_generator.cc
  51. 2
      src/compiler/csharp_generator.h
  52. 7
      src/compiler/csharp_plugin.cc
  53. 36
      src/compiler/python_generator.cc
  54. 10
      src/compiler/python_generator_helpers.h
  55. 78
      src/core/ext/filters/client_channel/backend_metric.cc
  56. 36
      src/core/ext/filters/client_channel/backend_metric.h
  57. 558
      src/core/ext/filters/client_channel/client_channel.cc
  58. 26
      src/core/ext/filters/client_channel/lb_policy.h
  59. 2
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  60. 49
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  61. 2
      src/core/ext/transport/chttp2/transport/hpack_parser.h
  62. 21
      src/core/ext/transport/chttp2/transport/hpack_table.cc
  63. 15
      src/core/ext/transport/chttp2/transport/hpack_table.h
  64. 13
      src/core/ext/transport/chttp2/transport/parsing.cc
  65. 37
      src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c
  66. 83
      src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h
  67. 67
      src/core/ext/upb-generated/envoy/api/v2/cds.upb.c
  68. 81
      src/core/ext/upb-generated/envoy/api/v2/cds.upb.h
  69. 34
      src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c
  70. 69
      src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h
  71. 32
      src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c
  72. 87
      src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h
  73. 32
      src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c
  74. 98
      src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h
  75. 15
      src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c
  76. 32
      src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h
  77. 35
      src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c
  78. 80
      src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h
  79. 12
      src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c
  80. 69
      src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h
  81. 58
      src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
  82. 144
      src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h
  83. 11
      src/core/lib/gprpp/map.h
  84. 2
      src/core/lib/gprpp/ref_counted_ptr.h
  85. 5
      src/core/lib/iomgr/tcp_posix.cc
  86. 6
      src/core/lib/slice/slice_intern.cc
  87. 729
      src/core/lib/transport/static_metadata.cc
  88. 176
      src/core/lib/transport/static_metadata.h
  89. 9
      src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
  90. 4
      src/cpp/client/create_channel.cc
  91. 6
      src/cpp/server/secure_server_credentials.h
  92. 63
      src/csharp/Grpc.Core.Api/LiteClientBase.cs
  93. 21
      src/csharp/Grpc.Core.Api/SerializationContext.cs
  94. 2
      src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs
  95. 207
      src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs
  96. 10
      src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs
  97. 163
      src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs
  98. 10
      src/csharp/Grpc.Core.Tests/TimeoutsTest.cs
  99. 32
      src/csharp/Grpc.Core/Internal/AsyncCall.cs
  100. 44
      src/csharp/Grpc.Core/Internal/AsyncCallBase.cs
  101. Some files were not shown because too many files have changed in this diff Show More

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

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

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

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

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

3
.gitmodules vendored

@ -54,3 +54,6 @@
[submodule "third_party/upb"]
path = third_party/upb
url = https://github.com/protocolbuffers/upb.git
[submodule "third_party/udpa"]
path = third_party/udpa
url = https://github.com/cncf/udpa.git

38
BUILD

@ -31,6 +31,7 @@ load(
"grpc_cc_library",
"grpc_generate_one_off_targets",
"grpc_upb_proto_library",
"python_config_settings",
)
config_setting(
@ -63,11 +64,6 @@ config_setting(
values = {"cpu": "x64_windows_msvc"},
)
config_setting(
name = "python3",
values = {"python_path": "python3"},
)
config_setting(
name = "mac_x86_64",
values = {"cpu": "darwin"},
@ -78,6 +74,8 @@ config_setting(
values = {"define": "GRPC_USE_CPP_STD_LIB=1"},
)
python_config_settings()
# This should be updated along with build.yaml
g_stands_for = "ganges"
@ -1009,6 +1007,7 @@ grpc_cc_library(
name = "grpc_client_channel",
srcs = [
"src/core/ext/filters/client_channel/backup_poller.cc",
"src/core/ext/filters/client_channel/backend_metric.cc",
"src/core/ext/filters/client_channel/channel_connectivity.cc",
"src/core/ext/filters/client_channel/client_channel.cc",
"src/core/ext/filters/client_channel/client_channel_channelz.cc",
@ -1037,6 +1036,7 @@ grpc_cc_library(
],
hdrs = [
"src/core/ext/filters/client_channel/backup_poller.h",
"src/core/ext/filters/client_channel/backend_metric.h",
"src/core/ext/filters/client_channel/client_channel.h",
"src/core/ext/filters/client_channel/client_channel_channelz.h",
"src/core/ext/filters/client_channel/client_channel_factory.h",
@ -1066,6 +1066,7 @@ grpc_cc_library(
],
language = "c++",
deps = [
"envoy_orca_upb",
"gpr_base",
"grpc_base",
"grpc_client_authority_filter",
@ -2278,6 +2279,7 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.c",
@ -2290,6 +2292,7 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.h",
@ -2318,6 +2321,7 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c",
],
hdrs = [
@ -2326,6 +2330,7 @@ grpc_cc_library(
"src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h",
],
external_deps = [
@ -2378,6 +2383,29 @@ grpc_cc_library(
],
)
# Once upb code-gen issue is resolved, replace envoy_orca_upb with this.
# grpc_upb_proto_library(
# name = "envoy_orca_upb",
# deps = ["@envoy_api//udpa/data/orca/v1:orca_load_report"]
# )
grpc_cc_library(
name = "envoy_orca_upb",
srcs = [
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h",
],
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":proto_gen_validate_upb",
],
)
# Once upb code-gen issue is resolved, replace grpc_health_upb with this.
# grpc_upb_proto_library(
# name = "grpc_health_upb",

@ -208,6 +208,8 @@ config("grpc_config") {
"include/grpc/status.h",
"include/grpc/support/workaround_list.h",
"src/core/ext/filters/census/grpc_context.cc",
"src/core/ext/filters/client_channel/backend_metric.cc",
"src/core/ext/filters/client_channel/backend_metric.h",
"src/core/ext/filters/client_channel/backup_poller.cc",
"src/core/ext/filters/client_channel/backup_poller.h",
"src/core/ext/filters/client_channel/channel_connectivity.cc",
@ -388,6 +390,8 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c",
@ -400,6 +404,8 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c",
@ -450,6 +456,8 @@ config("grpc_config") {
"src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h",
"src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c",
"src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h",
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c",
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.c",
"src/core/ext/upb-generated/validate/validate.upb.h",
"src/core/lib/avl/avl.cc",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -269,13 +269,22 @@ def grpc_sh_binary(name, srcs, data = []):
data = data,
)
def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False):
def grpc_py_binary(name,
srcs,
data = [],
deps = [],
external_deps = [],
testonly = False,
python_version = "PY2",
**kwargs):
native.py_binary(
name = name,
srcs = srcs,
testonly = testonly,
data = data,
deps = deps + _get_external_deps(external_deps),
python_version = python_version,
**kwargs
)
def grpc_package(name, visibility = "private", features = []):
@ -333,3 +342,10 @@ def grpc_objc_library(
def grpc_upb_proto_library(name, deps):
upb_proto_library(name = name, deps = deps)
def python_config_settings():
native.config_setting(
name = "python3",
flag_values = {"@bazel_tools//tools/python:python_version": "PY3"},
)

@ -151,9 +151,9 @@ def grpc_deps():
if "com_github_google_benchmark" not in native.existing_rules():
http_archive(
name = "com_github_google_benchmark",
sha256 = "c7682e9007ddfd94072647abab3e89ffd9084089460ae47d67060974467b58bf",
strip_prefix = "benchmark-e776aa0275e293707b6a0901e0e8d8a8a3679508",
url = "https://github.com/google/benchmark/archive/e776aa0275e293707b6a0901e0e8d8a8a3679508.tar.gz",
sha256 = "f68aec93154d010324c05bcd8c5cc53468b87af88d87acb5ddcfaa1bba044837",
strip_prefix = "benchmark-090faecb454fbd6e6e17a75ef8146acb037118d4",
url = "https://github.com/google/benchmark/archive/090faecb454fbd6e6e17a75ef8146acb037118d4.tar.gz",
)
if "com_github_cares_cares" not in native.existing_rules():
@ -176,11 +176,11 @@ def grpc_deps():
if "bazel_toolchains" not in native.existing_rules():
http_archive(
name = "bazel_toolchains",
sha256 = "d968b414b32aa99c86977e1171645d31da2b52ac88060de3ac1e49932d5dcbf1",
strip_prefix = "bazel-toolchains-4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47",
sha256 = "872955b658113924eb1a3594b04d43238da47f4f90c17b76e8785709490dc041",
strip_prefix = "bazel-toolchains-1083686fde6032378d52b4c98044922cebde364e",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz",
],
)
@ -221,10 +221,11 @@ def grpc_deps():
)
if "build_bazel_rules_apple" not in native.existing_rules():
git_repository(
http_archive(
name = "build_bazel_rules_apple",
remote = "https://github.com/bazelbuild/rules_apple.git",
tag = "0.17.2",
url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
)
grpc_python_deps()

@ -47,6 +47,15 @@ def grpc_python_deps():
remote = "https://github.com/bazelbuild/rules_python.git",
)
if "rules_python" not in native.existing_rules():
http_archive(
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
sha256 = "f7402f11691d657161f871e11968a984e5b48b023321935f5a55d7e56cf4758a",
strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
)
python_configure(name = "local_config_python")
native.bind(

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

@ -113,6 +113,7 @@ filegroups:
- src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h
- src/core/ext/upb-generated/envoy/api/v2/cds.upb.h
- src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h
- src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h
- src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h
- src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h
- src/core/ext/upb-generated/envoy/api/v2/eds.upb.h
@ -124,6 +125,7 @@ filegroups:
- src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c
- src/core/ext/upb-generated/envoy/api/v2/cds.upb.c
- src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c
- src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c
- src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c
- src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c
- src/core/ext/upb-generated/envoy/api/v2/eds.upb.c
@ -143,6 +145,7 @@ filegroups:
- src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h
- src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h
- src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h
- src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h
- src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h
src:
- src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c
@ -150,11 +153,19 @@ filegroups:
- src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c
- src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c
- src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c
- src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c
- src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c
uses:
- envoy_type_upb
- google_api_upb
- proto_gen_validate_upb
- name: envoy_orca_upb
headers:
- src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h
src:
- src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
uses:
- proto_gen_validate_upb
- name: envoy_type_upb
headers:
- src/core/ext/upb-generated/envoy/type/percent.upb.h
@ -945,6 +956,7 @@ filegroups:
- grpc_base
- name: grpc_client_channel
headers:
- src/core/ext/filters/client_channel/backend_metric.h
- src/core/ext/filters/client_channel/backup_poller.h
- src/core/ext/filters/client_channel/client_channel.h
- src/core/ext/filters/client_channel/client_channel_channelz.h
@ -973,6 +985,7 @@ filegroups:
- src/core/ext/filters/client_channel/subchannel_interface.h
- src/core/ext/filters/client_channel/subchannel_pool_interface.h
src:
- src/core/ext/filters/client_channel/backend_metric.cc
- src/core/ext/filters/client_channel/backup_poller.cc
- src/core/ext/filters/client_channel/channel_connectivity.cc
- src/core/ext/filters/client_channel/client_channel.cc
@ -1004,6 +1017,7 @@ filegroups:
- grpc_base
- grpc_deadline_filter
- grpc_health_upb
- envoy_orca_upb
- name: grpc_client_idle_filter
src:
- src/core/ext/filters/client_idle/client_idle_filter.cc
@ -4741,6 +4755,7 @@ targets:
build: test
language: c++
src:
- src/proto/grpc/lb/v2/orca_load_report_for_test.proto
- test/cpp/end2end/client_lb_end2end_test.cc
deps:
- grpc++_test_util
@ -6052,11 +6067,11 @@ vspackages:
configs:
asan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer
-Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address
-fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
LD: clang++
LDFLAGS: -fsanitize=address
LDFLAGS: -stdlib=libc++ -fsanitize=address
LDXX: clang++
compile_the_world: true
test_environ:
@ -6064,23 +6079,23 @@ configs:
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
asan-noleaks:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer
-Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address
-fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
LD: clang++
LDFLAGS: -fsanitize=address
LDFLAGS: -stdlib=libc++ -fsanitize=address
LDXX: clang++
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=0:color=always
asan-trace-cmp:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp
-fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument
-DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
LD: clang++
LDFLAGS: -fsanitize=address
LDFLAGS: -stdlib=libc++ -fsanitize=address
LDXX: clang++
compile_the_world: true
test_environ:
@ -6122,13 +6137,14 @@ configs:
valgrind: --tool=memcheck --leak-check=full
msan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory -fsanitize-memory-track-origins
-fsanitize-memory-use-after-dtor -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0
-DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory
-fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer
-DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument
-fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
DEFINES: NDEBUG
LD: clang++
LDFLAGS: -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
LDFLAGS: -stdlib=libc++ -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1
-fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDXX: clang++
compile_the_world: true
@ -6150,24 +6166,24 @@ configs:
DEFINES: NDEBUG
tsan:
CC: clang
CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument
-DGPR_NO_DIRECT_SYSCALLS
CXX: clang++
DEFINES: GRPC_TSAN
LD: clang++
LDFLAGS: -fsanitize=thread
LDFLAGS: -stdlib=libc++ -fsanitize=thread
LDXX: clang++
compile_the_world: true
test_environ:
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
ubsan:
CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer
-Wno-unused-command-line-argument -Wvarargs
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined
-fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
CXX: clang++
DEFINES: NDEBUG GRPC_UBSAN
LD: clang++
LDFLAGS: -fsanitize=undefined,unsigned-integer-overflow
LDFLAGS: -stdlib=libc++ -fsanitize=undefined,unsigned-integer-overflow
LDXX: clang++
compile_the_world: true
test_environ:

@ -24,13 +24,17 @@ if test "$PHP_GRPC" != "no"; then
case $host in
*darwin*)
PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD)
;;
*)
PHP_ADD_LIBRARY(stdc++,1,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;
esac
PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc,
src/php/ext/grpc/byte_buffer.c \
src/php/ext/grpc/call.c \
@ -349,6 +353,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
src/core/ext/transport/chttp2/client/authority.cc \
src/core/ext/transport/chttp2/client/chttp2_connector.cc \
src/core/ext/filters/client_channel/backend_metric.cc \
src/core/ext/filters/client_channel/backup_poller.cc \
src/core/ext/filters/client_channel/channel_connectivity.cc \
src/core/ext/filters/client_channel/client_channel.cc \
@ -377,6 +382,19 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/client_channel/subchannel_pool_interface.cc \
src/core/ext/filters/deadline/deadline_filter.cc \
src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \
src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \
src/core/ext/upb-generated/gogoproto/gogo.upb.c \
src/core/ext/upb-generated/validate/validate.upb.c \
src/core/ext/upb-generated/google/api/annotations.upb.c \
src/core/ext/upb-generated/google/api/http.upb.c \
src/core/ext/upb-generated/google/protobuf/any.upb.c \
src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \
src/core/ext/upb-generated/google/protobuf/duration.upb.c \
src/core/ext/upb-generated/google/protobuf/empty.upb.c \
src/core/ext/upb-generated/google/protobuf/struct.upb.c \
src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \
src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \
src/core/ext/upb-generated/google/rpc/status.upb.c \
src/core/tsi/fake_transport_security.cc \
src/core/tsi/local_transport_security.cc \
src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
@ -396,16 +414,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \
src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \
src/core/ext/upb-generated/google/api/annotations.upb.c \
src/core/ext/upb-generated/google/api/http.upb.c \
src/core/ext/upb-generated/google/protobuf/any.upb.c \
src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \
src/core/ext/upb-generated/google/protobuf/duration.upb.c \
src/core/ext/upb-generated/google/protobuf/empty.upb.c \
src/core/ext/upb-generated/google/protobuf/struct.upb.c \
src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \
src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \
src/core/ext/upb-generated/google/rpc/status.upb.c \
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc \
@ -414,6 +422,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \
src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \
src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \
src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \
@ -426,11 +435,10 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \
src/core/ext/upb-generated/envoy/type/percent.upb.c \
src/core/ext/upb-generated/envoy/type/range.upb.c \
src/core/ext/upb-generated/gogoproto/gogo.upb.c \
src/core/ext/upb-generated/validate/validate.upb.c \
src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
@ -766,6 +774,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/gcp)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/health/v1)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/lb/v1)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/udpa/data/orca/v1)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/validate)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/avl)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff)

@ -323,6 +323,7 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.cc " +
"src\\core\\ext\\transport\\chttp2\\client\\authority.cc " +
"src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.cc " +
"src\\core\\ext\\filters\\client_channel\\backend_metric.cc " +
"src\\core\\ext\\filters\\client_channel\\backup_poller.cc " +
"src\\core\\ext\\filters\\client_channel\\channel_connectivity.cc " +
"src\\core\\ext\\filters\\client_channel\\client_channel.cc " +
@ -351,6 +352,19 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " +
"src\\core\\ext\\filters\\deadline\\deadline_filter.cc " +
"src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1\\health.upb.c " +
"src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1\\orca_load_report.upb.c " +
"src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " +
"src\\core\\ext\\upb-generated\\validate\\validate.upb.c " +
"src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " +
"src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\any.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upb.c " +
"src\\core\\ext\\upb-generated\\google\\rpc\\status.upb.c " +
"src\\core\\tsi\\fake_transport_security.cc " +
"src\\core\\tsi\\local_transport_security.cc " +
"src\\core\\tsi\\ssl\\session_cache\\ssl_session_boringssl.cc " +
@ -370,16 +384,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.cc " +
"src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1\\load_balancer.upb.c " +
"src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " +
"src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\any.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upb.c " +
"src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upb.c " +
"src\\core\\ext\\upb-generated\\google\\rpc\\status.upb.c " +
"src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_channel_secure.cc " +
@ -388,6 +392,7 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\filter.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\outlier_detection.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\discovery.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upb.c " +
@ -400,11 +405,10 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\config_source.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\grpc_service.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\health_check.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\http_uri.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\protocol.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\type\\percent.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\type\\range.upb.c " +
"src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " +
"src\\core\\ext\\upb-generated\\validate\\validate.upb.c " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.cc " +
"src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " +
@ -785,6 +789,10 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\validate");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\avl");

@ -1172,7 +1172,7 @@ responses, it closes with OK.
### Echo Status
[Echo Status]: #echo-status
When the client sends a response_status in the request payload, the server closes
the stream with the status code and messsage contained within said response_status.
the stream with the status code and message contained within said response_status.
The server will not process any further messages on the stream sent by the client.
This can be used by clients to verify correct handling of different status codes and
associated status messages end-to-end.
@ -1189,7 +1189,7 @@ key and the corresponding value back to the client as trailing metadata.
[Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us
In StreamingOutputCall and FullDuplexCall, server delays sending a
StreamingOutputCallResponse by the ResponseParameters's `interval_us` for that
StreamingOutputCallResponse by the ResponseParameters' `interval_us` for that
particular response, relative to the last response sent. That is, `interval_us`
acts like a sleep *before* sending the response and accumulates from one
response to the next.

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

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

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

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

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

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

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

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

@ -352,6 +352,7 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security_interface.h',
'src/core/ext/transport/chttp2/client/authority.h',
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
'src/core/ext/filters/client_channel/backend_metric.h',
'src/core/ext/filters/client_channel/backup_poller.h',
'src/core/ext/filters/client_channel/client_channel.h',
'src/core/ext/filters/client_channel/client_channel_channelz.h',
@ -381,6 +382,19 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/subchannel_pool_interface.h',
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h',
'src/core/ext/upb-generated/gogoproto/gogo.upb.h',
'src/core/ext/upb-generated/validate/validate.upb.h',
'src/core/ext/upb-generated/google/api/annotations.upb.h',
'src/core/ext/upb-generated/google/api/http.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/empty.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/rpc/status.upb.h',
'src/core/tsi/fake_transport_security.h',
'src/core/tsi/local_transport_security.h',
'src/core/tsi/ssl/session_cache/ssl_session.h',
@ -540,16 +554,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h',
'src/core/ext/upb-generated/google/api/annotations.upb.h',
'src/core/ext/upb-generated/google/api/http.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/empty.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/rpc/status.upb.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h',
@ -557,6 +561,7 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h',
@ -569,11 +574,10 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h',
'src/core/ext/upb-generated/envoy/type/percent.upb.h',
'src/core/ext/upb-generated/envoy/type/range.upb.h',
'src/core/ext/upb-generated/gogoproto/gogo.upb.h',
'src/core/ext/upb-generated/validate/validate.upb.h',
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h',
@ -847,6 +851,7 @@ Pod::Spec.new do |s|
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
'src/core/ext/transport/chttp2/client/authority.cc',
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
'src/core/ext/filters/client_channel/backend_metric.cc',
'src/core/ext/filters/client_channel/backup_poller.cc',
'src/core/ext/filters/client_channel/channel_connectivity.cc',
'src/core/ext/filters/client_channel/client_channel.cc',
@ -875,6 +880,19 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/subchannel_pool_interface.cc',
'src/core/ext/filters/deadline/deadline_filter.cc',
'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/tsi/fake_transport_security.cc',
'src/core/tsi/local_transport_security.cc',
'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
@ -894,16 +912,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc',
@ -912,6 +920,7 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c',
@ -924,11 +933,10 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c',
'src/core/ext/upb-generated/envoy/type/percent.upb.c',
'src/core/ext/upb-generated/envoy/type/range.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
@ -1078,6 +1086,7 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security_interface.h',
'src/core/ext/transport/chttp2/client/authority.h',
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
'src/core/ext/filters/client_channel/backend_metric.h',
'src/core/ext/filters/client_channel/backup_poller.h',
'src/core/ext/filters/client_channel/client_channel.h',
'src/core/ext/filters/client_channel/client_channel_channelz.h',
@ -1107,6 +1116,19 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/subchannel_pool_interface.h',
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h',
'src/core/ext/upb-generated/gogoproto/gogo.upb.h',
'src/core/ext/upb-generated/validate/validate.upb.h',
'src/core/ext/upb-generated/google/api/annotations.upb.h',
'src/core/ext/upb-generated/google/api/http.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/empty.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/rpc/status.upb.h',
'src/core/tsi/fake_transport_security.h',
'src/core/tsi/local_transport_security.h',
'src/core/tsi/ssl/session_cache/ssl_session.h',
@ -1266,16 +1288,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h',
'src/core/ext/upb-generated/google/api/annotations.upb.h',
'src/core/ext/upb-generated/google/api/http.upb.h',
'src/core/ext/upb-generated/google/protobuf/any.upb.h',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h',
'src/core/ext/upb-generated/google/protobuf/duration.upb.h',
'src/core/ext/upb-generated/google/protobuf/empty.upb.h',
'src/core/ext/upb-generated/google/protobuf/struct.upb.h',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h',
'src/core/ext/upb-generated/google/rpc/status.upb.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h',
@ -1283,6 +1295,7 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h',
@ -1295,11 +1308,10 @@ Pod::Spec.new do |s|
'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h',
'src/core/ext/upb-generated/envoy/type/percent.upb.h',
'src/core/ext/upb-generated/envoy/type/range.upb.h',
'src/core/ext/upb-generated/gogoproto/gogo.upb.h',
'src/core/ext/upb-generated/validate/validate.upb.h',
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h',

@ -282,6 +282,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/tsi/transport_security_interface.h )
s.files += %w( src/core/ext/transport/chttp2/client/authority.h )
s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h )
s.files += %w( src/core/ext/filters/client_channel/backend_metric.h )
s.files += %w( src/core/ext/filters/client_channel/backup_poller.h )
s.files += %w( src/core/ext/filters/client_channel/client_channel.h )
s.files += %w( src/core/ext/filters/client_channel/client_channel_channelz.h )
@ -311,6 +312,19 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/client_channel/subchannel_pool_interface.h )
s.files += %w( src/core/ext/filters/deadline/deadline_filter.h )
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h )
s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h )
s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.h )
s.files += %w( src/core/ext/upb-generated/validate/validate.upb.h )
s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.h )
s.files += %w( src/core/ext/upb-generated/google/api/http.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.h )
s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.h )
s.files += %w( src/core/tsi/fake_transport_security.h )
s.files += %w( src/core/tsi/local_transport_security.h )
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session.h )
@ -470,16 +484,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h )
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h )
s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.h )
s.files += %w( src/core/ext/upb-generated/google/api/http.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.h )
s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.h )
s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.h )
s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h )
@ -487,6 +491,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.h )
@ -499,11 +504,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.h )
s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.h )
s.files += %w( src/core/ext/upb-generated/validate/validate.upb.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/subchannel_list.h )
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h )
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h )
@ -777,6 +781,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc )
s.files += %w( src/core/ext/transport/chttp2/client/authority.cc )
s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.cc )
s.files += %w( src/core/ext/filters/client_channel/backend_metric.cc )
s.files += %w( src/core/ext/filters/client_channel/backup_poller.cc )
s.files += %w( src/core/ext/filters/client_channel/channel_connectivity.cc )
s.files += %w( src/core/ext/filters/client_channel/client_channel.cc )
@ -805,6 +810,19 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/client_channel/subchannel_pool_interface.cc )
s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc )
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c )
s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c )
s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.c )
s.files += %w( src/core/ext/upb-generated/validate/validate.upb.c )
s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.c )
s.files += %w( src/core/ext/upb-generated/google/api/http.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.c )
s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.c )
s.files += %w( src/core/tsi/fake_transport_security.cc )
s.files += %w( src/core/tsi/local_transport_security.cc )
s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc )
@ -824,16 +842,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc )
s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c )
s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.c )
s.files += %w( src/core/ext/upb-generated/google/api/http.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.c )
s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.c )
s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.c )
s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc )
@ -842,6 +850,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.c )
@ -854,11 +863,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.c )
s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.c )
s.files += %w( src/core/ext/upb-generated/validate/validate.upb.c )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc )
s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc )

@ -553,6 +553,7 @@
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
'src/core/ext/transport/chttp2/client/authority.cc',
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
'src/core/ext/filters/client_channel/backend_metric.cc',
'src/core/ext/filters/client_channel/backup_poller.cc',
'src/core/ext/filters/client_channel/channel_connectivity.cc',
'src/core/ext/filters/client_channel/client_channel.cc',
@ -581,6 +582,19 @@
'src/core/ext/filters/client_channel/subchannel_pool_interface.cc',
'src/core/ext/filters/deadline/deadline_filter.cc',
'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/tsi/fake_transport_security.cc',
'src/core/tsi/local_transport_security.cc',
'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
@ -600,16 +614,6 @@
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc',
@ -618,6 +622,7 @@
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c',
@ -630,11 +635,10 @@
'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c',
'src/core/ext/upb-generated/envoy/type/percent.upb.c',
'src/core/ext/upb-generated/envoy/type/range.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
@ -857,6 +861,7 @@
'src/core/lib/transport/transport_op_string.cc',
'src/core/lib/uri/uri_parser.cc',
'src/core/lib/debug/trace.cc',
'src/core/ext/filters/client_channel/backend_metric.cc',
'src/core/ext/filters/client_channel/backup_poller.cc',
'src/core/ext/filters/client_channel/channel_connectivity.cc',
'src/core/ext/filters/client_channel/client_channel.cc',
@ -891,6 +896,19 @@
'third_party/upb/upb/port.c',
'third_party/upb/upb/table.c',
'third_party/upb/upb/upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
@ -1112,6 +1130,7 @@
'src/core/lib/transport/transport_op_string.cc',
'src/core/lib/uri/uri_parser.cc',
'src/core/lib/debug/trace.cc',
'src/core/ext/filters/client_channel/backend_metric.cc',
'src/core/ext/filters/client_channel/backup_poller.cc',
'src/core/ext/filters/client_channel/channel_connectivity.cc',
'src/core/ext/filters/client_channel/client_channel.cc',
@ -1146,6 +1165,19 @@
'third_party/upb/upb/port.c',
'third_party/upb/upb/table.c',
'third_party/upb/upb/upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
@ -1378,6 +1410,7 @@
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
'src/core/ext/transport/chttp2/client/authority.cc',
'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
'src/core/ext/filters/client_channel/backend_metric.cc',
'src/core/ext/filters/client_channel/backup_poller.cc',
'src/core/ext/filters/client_channel/channel_connectivity.cc',
'src/core/ext/filters/client_channel/client_channel.cc',
@ -1412,6 +1445,19 @@
'third_party/upb/upb/port.c',
'third_party/upb/upb/table.c',
'third_party/upb/upb/upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/transport/inproc/inproc_plugin.cc',
'src/core/ext/transport/inproc/inproc_transport.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
@ -1435,16 +1481,6 @@
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c',
'src/core/ext/upb-generated/google/api/annotations.upb.c',
'src/core/ext/upb-generated/google/api/http.upb.c',
'src/core/ext/upb-generated/google/protobuf/any.upb.c',
'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c',
'src/core/ext/upb-generated/google/protobuf/duration.upb.c',
'src/core/ext/upb-generated/google/protobuf/empty.upb.c',
'src/core/ext/upb-generated/google/protobuf/struct.upb.c',
'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c',
'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c',
'src/core/ext/upb-generated/google/rpc/status.upb.c',
'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
@ -1452,6 +1488,7 @@
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c',
@ -1464,11 +1501,10 @@
'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c',
'src/core/ext/upb-generated/envoy/type/percent.upb.c',
'src/core/ext/upb-generated/envoy/type/range.upb.c',
'src/core/ext/upb-generated/gogoproto/gogo.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
'src/core/ext/filters/census/grpc_context.cc',
@ -2234,8 +2270,11 @@
],
'sources': [
'third_party/benchmark/src/benchmark.cc',
'third_party/benchmark/src/benchmark_api_internal.cc',
'third_party/benchmark/src/benchmark_main.cc',
'third_party/benchmark/src/benchmark_name.cc',
'third_party/benchmark/src/benchmark_register.cc',
'third_party/benchmark/src/benchmark_runner.cc',
'third_party/benchmark/src/colorprint.cc',
'third_party/benchmark/src/commandlineflags.cc',
'third_party/benchmark/src/complexity.cc',

@ -32,8 +32,7 @@
* in-house library if possible. (e.g. std::map)
*/
#ifndef GRPC_USE_CPP_STD_LIB
/* Default value will be 1 once all tests become green. */
#define GRPC_USE_CPP_STD_LIB 0
#define GRPC_USE_CPP_STD_LIB 1
#endif
/* Get windows.h included everywhere (we need it) */

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

@ -197,7 +197,7 @@ template <class R>
class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncReader));
}
@ -346,7 +346,7 @@ template <class W>
class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncWriter));
}
@ -514,7 +514,7 @@ class ClientAsyncReaderWriter final
: public ClientAsyncReaderWriterInterface<W, R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientAsyncReaderWriter));
}

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

@ -88,6 +88,9 @@ class WriteOptions {
WriteOptions(const WriteOptions& other)
: flags_(other.flags_), last_message_(other.last_message_) {}
/// Default assignment operator
WriteOptions& operator=(const WriteOptions& other) = default;
/// Clear all flags.
inline void Clear() { flags_ = 0; }
@ -206,13 +209,14 @@ namespace internal {
template <int I>
class CallNoOp {
protected:
void AddOp(grpc_op* ops, size_t* nops) {}
void FinishOp(bool* status) {}
void AddOp(grpc_op* /*ops*/, size_t* /*nops*/) {}
void FinishOp(bool* /*status*/) {}
void SetInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
}
};
class CallOpSendInitialMetadata {
@ -252,7 +256,7 @@ class CallOpSendInitialMetadata {
maybe_compression_level_.level;
}
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (!send_ || hijacked_) return;
g_core_codegen_interface->gpr_free(initial_metadata_);
send_ = false;
@ -267,9 +271,9 @@ class CallOpSendInitialMetadata {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -363,7 +367,7 @@ class CallOpSendMessage {
nullptr);
}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -605,7 +609,7 @@ class CallOpClientSendClose {
op->flags = 0;
op->reserved = NULL;
}
void FinishOp(bool* status) { send_ = false; }
void FinishOp(bool* /*status*/) { send_ = false; }
void SetInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {
@ -615,9 +619,9 @@ class CallOpClientSendClose {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -658,7 +662,7 @@ class CallOpServerSendStatus {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (!send_status_available_ || hijacked_) return;
g_core_codegen_interface->gpr_free(trailing_metadata_);
send_status_available_ = false;
@ -675,9 +679,9 @@ class CallOpServerSendStatus {
}
void SetFinishInterceptionHookPoint(
InterceptorBatchMethodsImpl* interceptor_methods) {}
InterceptorBatchMethodsImpl* /*interceptor_methods*/) {}
void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {
void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) {
hijacked_ = true;
}
@ -712,7 +716,7 @@ class CallOpRecvInitialMetadata {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (metadata_map_ == nullptr || hijacked_) return;
}
@ -766,7 +770,7 @@ class CallOpClientRecvStatus {
op->reserved = NULL;
}
void FinishOp(bool* status) {
void FinishOp(bool* /*status*/) {
if (recv_status_ == nullptr || hijacked_) return;
grpc::string binary_error_details = metadata_map_->GetBinaryErrorDetails();
*recv_status_ =

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

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

@ -272,7 +272,7 @@ class ClientBidiReactor {
/// have completed and provides the RPC status outcome.
///
/// \param[in] s The status outcome of this RPC
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
/// Notifies the application that a read of initial metadata from the
/// server is done. If the application chooses not to implement this method,
@ -281,19 +281,19 @@ class ClientBidiReactor {
///
/// \param[in] ok Was the initial metadata read successfully? If false, no
/// further read-side operation will succeed.
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
/// Notifies the application that a StartRead operation completed.
///
/// \param[in] ok Was it successful? If false, no further read-side operation
/// will succeed.
virtual void OnReadDone(bool ok) {}
virtual void OnReadDone(bool /*ok*/) {}
/// Notifies the application that a StartWrite operation completed.
///
/// \param[in] ok Was it successful? If false, no further write-side operation
/// will succeed.
virtual void OnWriteDone(bool ok) {}
virtual void OnWriteDone(bool /*ok*/) {}
/// Notifies the application that a StartWritesDone operation completed. Note
/// that this is only used on explicit StartWritesDone operations and not for
@ -301,7 +301,7 @@ class ClientBidiReactor {
///
/// \param[in] ok Was it successful? If false, the application will later see
/// the failure reflected as a bad status in OnDone.
virtual void OnWritesDoneDone(bool ok) {}
virtual void OnWritesDoneDone(bool /*ok*/) {}
private:
friend class ClientCallbackReaderWriter<Request, Response>;
@ -325,9 +325,9 @@ class ClientReadReactor {
void AddMultipleHolds(int holds) { reader_->AddHold(holds); }
void RemoveHold() { reader_->RemoveHold(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnReadDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
virtual void OnReadDone(bool /*ok*/) {}
private:
friend class ClientCallbackReader<Response>;
@ -358,10 +358,10 @@ class ClientWriteReactor {
void AddMultipleHolds(int holds) { writer_->AddHold(holds); }
void RemoveHold() { writer_->RemoveHold(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnWriteDone(bool ok) {}
virtual void OnWritesDoneDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
virtual void OnWriteDone(bool /*ok*/) {}
virtual void OnWritesDoneDone(bool /*ok*/) {}
private:
friend class ClientCallbackWriter<Request>;
@ -385,8 +385,8 @@ class ClientUnaryReactor {
virtual ~ClientUnaryReactor() {}
void StartCall() { call_->StartCall(); }
virtual void OnDone(const ::grpc::Status& s) {}
virtual void OnReadInitialMetadataDone(bool ok) {}
virtual void OnDone(const ::grpc::Status& /*s*/) {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
private:
friend class ClientCallbackUnary;
@ -416,7 +416,7 @@ class ClientCallbackReaderWriterImpl
: public experimental::ClientCallbackReaderWriter<Request, Response> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackReaderWriterImpl));
}
@ -490,7 +490,7 @@ class ClientCallbackReaderWriterImpl
call_.PerformOps(&writes_done_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -628,7 +628,7 @@ class ClientCallbackReaderImpl
: public experimental::ClientCallbackReader<Response> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackReaderImpl));
}
@ -682,7 +682,7 @@ class ClientCallbackReaderImpl
call_.PerformOps(&read_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -768,7 +768,7 @@ class ClientCallbackWriterImpl
: public experimental::ClientCallbackWriter<Request> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackWriterImpl));
}
@ -830,7 +830,7 @@ class ClientCallbackWriterImpl
call_.PerformOps(&writes_done_ops_);
}
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
@ -956,7 +956,7 @@ class ClientCallbackWriterFactory {
class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* ptr, std::size_t size) {
static void operator delete(void* /*ptr*/, std::size_t size) {
assert(size == sizeof(ClientCallbackUnaryImpl));
}
@ -985,7 +985,7 @@ class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary {
start_ops_.set_core_cq_tag(&start_tag_);
call_.PerformOps(&start_ops_);
finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); },
finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
&finish_ops_);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);

@ -465,7 +465,7 @@ class CancelInterceptorBatchMethods
return nullptr;
}
void ModifySendMessage(const void* message) override {
void ModifySendMessage(const void* /*message*/) override {
GPR_CODEGEN_ASSERT(
false &&
"It is illegal to call ModifySendMessage on a method which "
@ -486,7 +486,7 @@ class CancelInterceptorBatchMethods
return Status();
}
void ModifySendStatus(const Status& status) override {
void ModifySendStatus(const Status& /*status*/) override {
GPR_CODEGEN_ASSERT(false &&
"It is illegal to call ModifySendStatus on a method "
"which has a Cancel notification");

@ -88,7 +88,7 @@ class RpcMethodHandler : public MethodHandler {
}
void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status,
void** handler_data) final {
void** /*handler_data*/) final {
ByteBuffer buf;
buf.set_buffer(req);
auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc(
@ -193,7 +193,7 @@ class ServerStreamingHandler : public MethodHandler {
}
void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status,
void** handler_data) final {
void** /*handler_data*/) final {
ByteBuffer buf;
buf.set_buffer(req);
auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc(
@ -328,8 +328,8 @@ class ErrorMethodHandler : public MethodHandler {
param.call->cq()->Pluck(&ops);
}
void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status,
void** handler_data) final {
void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req,
Status* /*status*/, void** /*handler_data*/) final {
// We have to destroy any request payload
if (req != nullptr) {
g_core_codegen_interface->grpc_byte_buffer_destroy(req);

@ -76,8 +76,8 @@ class MethodHandler {
a HandlerParameter and passed to RunHandler. It is illegal to access the
pointer after calling RunHandler. Ownership of the deserialized request is
retained by the handler. Returns nullptr if deserialization failed. */
virtual void* Deserialize(grpc_call* call, grpc_byte_buffer* req,
Status* status, void** handler_data) {
virtual void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req,
Status* /*status*/, void** /*handler_data*/) {
GPR_CODEGEN_ASSERT(req == nullptr);
return nullptr;
}

@ -314,7 +314,7 @@ class ServerBidiReactor : public internal::ServerReactor {
/// is a result of the client calling StartCall().
///
/// \param[in] context The context object now associated with this RPC
virtual void OnStarted(::grpc_impl::ServerContext* context) {}
virtual void OnStarted(::grpc_impl::ServerContext* /*context*/) {}
/// Notifies the application that an explicit StartSendInitialMetadata
/// operation completed. Not used when the sending of initial metadata
@ -322,20 +322,20 @@ class ServerBidiReactor : public internal::ServerReactor {
///
/// \param[in] ok Was it successful? If false, no further write-side operation
/// will succeed.
virtual void OnSendInitialMetadataDone(bool ok) {}
virtual void OnSendInitialMetadataDone(bool /*ok*/) {}
/// Notifies the application that a StartRead operation completed.
///
/// \param[in] ok Was it successful? If false, no further read-side operation
/// will succeed.
virtual void OnReadDone(bool ok) {}
virtual void OnReadDone(bool /*ok*/) {}
/// Notifies the application that a StartWrite (or StartWriteLast) operation
/// completed.
///
/// \param[in] ok Was it successful? If false, no further write-side operation
/// will succeed.
virtual void OnWriteDone(bool ok) {}
virtual void OnWriteDone(bool /*ok*/) {}
/// Notifies the application that all operations associated with this RPC
/// have completed. This is an override (from the internal base class) but not
@ -376,11 +376,12 @@ class ServerReadReactor : public internal::ServerReactor {
///
/// \param[in] context The context object now associated with this RPC
/// \param[in] resp The response object to be used by this RPC
virtual void OnStarted(::grpc_impl::ServerContext* context, Response* resp) {}
virtual void OnStarted(::grpc_impl::ServerContext* /*context*/,
Response* /*resp*/) {}
/// The following notifications are exactly like ServerBidiReactor.
virtual void OnSendInitialMetadataDone(bool ok) {}
virtual void OnReadDone(bool ok) {}
virtual void OnSendInitialMetadataDone(bool /*ok*/) {}
virtual void OnReadDone(bool /*ok*/) {}
void OnDone() override {}
void OnCancel() override {}
@ -423,12 +424,12 @@ class ServerWriteReactor : public internal::ServerReactor {
///
/// \param[in] context The context object now associated with this RPC
/// \param[in] req The request object sent by the client
virtual void OnStarted(::grpc_impl::ServerContext* context,
const Request* req) {}
virtual void OnStarted(::grpc_impl::ServerContext* /*context*/,
const Request* /*req*/) {}
/// The following notifications are exactly like ServerBidiReactor.
virtual void OnSendInitialMetadataDone(bool ok) {}
virtual void OnWriteDone(bool ok) {}
virtual void OnSendInitialMetadataDone(bool /*ok*/) {}
virtual void OnWriteDone(bool /*ok*/) {}
void OnDone() override {}
void OnCancel() override {}
@ -849,7 +850,7 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler {
}
void* Deserialize(grpc_call* call, grpc_byte_buffer* req,
::grpc::Status* status, void** handler_data) final {
::grpc::Status* status, void** /*handler_data*/) final {
::grpc::ByteBuffer buf;
buf.set_buffer(req);
auto* request =

@ -130,7 +130,7 @@ class ServerInterface : public internal::CallHook {
virtual ~experimental_registration_interface() {}
/// May not be abstract since this is a post-1.0 API addition
virtual void RegisterCallbackGenericService(
experimental::CallbackGenericService* service) {}
experimental::CallbackGenericService* /*service*/) {}
};
/// NOTE: The function experimental_registration() is not stable public API.

@ -39,7 +39,7 @@ namespace grpc {
template <typename T>
class TimePoint {
public:
TimePoint(const T& time) { you_need_a_specialization_of_TimePoint(); }
TimePoint(const T& /*time*/) { you_need_a_specialization_of_TimePoint(); }
gpr_timespec raw_time() {
gpr_timespec t;
return t;

@ -42,7 +42,7 @@ class ServerBuilderPlugin {
/// UpdateServerBuilder will be called at an early stage in
/// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have
/// done their updates.
virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* builder) {}
virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* /*builder*/) {}
/// InitServer will be called in ServerBuilder::BuildAndStart(), after the
/// Server instance is created.
@ -57,7 +57,7 @@ class ServerBuilderPlugin {
/// UpdateChannelArguments will be called in ServerBuilder::BuildAndStart(),
/// before the Server instance is created.
virtual void UpdateChannelArguments(ChannelArguments* args) {}
virtual void UpdateChannelArguments(ChannelArguments* /*args*/) {}
virtual bool has_sync_methods() const { return false; }
virtual bool has_async_methods() const { return false; }

@ -95,10 +95,10 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen {
// This function should have been a pure virtual function, but it is
// implemented as a virtual function so that it does not break API.
virtual std::shared_ptr<Channel> CreateChannelWithInterceptors(
const grpc::string& target, const ChannelArguments& args,
const grpc::string& /*target*/, const ChannelArguments& /*args*/,
std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
/*interceptor_creators*/) {
return nullptr;
}
};

@ -81,16 +81,16 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen {
public:
virtual ~GlobalCallbacks() {}
/// Called before server is created.
virtual void UpdateArguments(ChannelArguments* args) {}
virtual void UpdateArguments(ChannelArguments* /*args*/) {}
/// Called before application callback for each synchronous server request
virtual void PreSynchronousRequest(grpc_impl::ServerContext* context) = 0;
/// Called after application callback for each synchronous server request
virtual void PostSynchronousRequest(grpc_impl::ServerContext* context) = 0;
/// Called before server is started.
virtual void PreServerStart(Server* server) {}
virtual void PreServerStart(Server* /*server*/) {}
/// Called after a server port is added.
virtual void AddPort(Server* server, const grpc::string& addr,
grpc::ServerCredentials* creds, int port) {}
virtual void AddPort(Server* /*server*/, const grpc::string& /*addr*/,
grpc::ServerCredentials* /*creds*/, int /*port*/) {}
};
/// Set the global callback object. Can only be called once per application.
/// Does not take ownership of callbacks, and expects the pointed to object

@ -132,7 +132,7 @@ class ChannelArguments {
/// Default pointer argument operations.
struct PointerVtableMembers {
static void* Copy(void* in) { return in; }
static void Destroy(void* in) {}
static void Destroy(void* /*in*/) {}
static int Compare(void* a, void* b) {
if (a < b) return -1;
if (a > b) return 1;

@ -287,6 +287,7 @@
<file baseinstalldir="/" name="src/core/tsi/transport_security_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/authority.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backend_metric.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backup_poller.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel_channelz.h" role="src" />
@ -316,6 +317,19 @@
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_pool_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/gogoproto/gogo.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/validate/validate.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/annotations.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/http.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/any.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/descriptor.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/duration.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/empty.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/struct.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/timestamp.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/wrappers.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/rpc/status.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/local_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session.h" role="src" />
@ -475,16 +489,6 @@
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/annotations.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/http.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/any.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/descriptor.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/duration.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/empty.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/struct.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/timestamp.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/wrappers.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/rpc/status.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h" role="src" />
@ -492,6 +496,7 @@
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cds.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/eds.upb.h" role="src" />
@ -504,11 +509,10 @@
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/percent.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/range.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/gogoproto/gogo.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/validate/validate.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/subchannel_list.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" role="src" />
@ -782,6 +786,7 @@
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/authority.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backend_metric.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/backup_poller.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/channel_connectivity.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel.cc" role="src" />
@ -810,6 +815,19 @@
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_pool_interface.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/gogoproto/gogo.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/validate/validate.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/annotations.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/http.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/any.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/descriptor.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/duration.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/empty.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/struct.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/timestamp.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/wrappers.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/rpc/status.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/local_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc" role="src" />
@ -829,16 +847,6 @@
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/annotations.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/api/http.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/any.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/descriptor.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/duration.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/empty.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/struct.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/timestamp.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/protobuf/wrappers.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/google/rpc/status.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc" role="src" />
@ -847,6 +855,7 @@
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cds.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/eds.upb.c" role="src" />
@ -859,11 +868,10 @@
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/percent.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/range.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/gogoproto/gogo.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/validate/validate.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc" role="src" />

@ -794,8 +794,8 @@ void PrintHeaderServerAsyncMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -815,9 +815,9 @@ void PrintHeaderServerAsyncMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReader< $Request$>* /*reader*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -837,8 +837,8 @@ void PrintHeaderServerAsyncMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) override "
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"::grpc::ServerWriter< $Response$>* /*writer*/) override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -860,8 +860,8 @@ void PrintHeaderServerAsyncMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* stream) "
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) "
" override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -896,7 +896,8 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer,
"class WithAsyncMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,
@ -923,16 +924,16 @@ void PrintHeaderServerCallbackMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
printer->Print(
*vars,
"virtual void $Method$("
"::grpc::ServerContext* context, const $RealRequest$* request, "
"$RealResponse$* response, "
"::grpc::ServerContext* /*context*/, const $RealRequest$* /*request*/, "
"$RealResponse$* /*response*/, "
"::grpc::experimental::ServerCallbackRpcController* "
"controller) { controller->Finish(::grpc::Status("
"::grpc::StatusCode::UNIMPLEMENTED, \"\")); }\n");
@ -941,9 +942,9 @@ void PrintHeaderServerCallbackMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReader< $Request$>* /*reader*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -958,8 +959,8 @@ void PrintHeaderServerCallbackMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) override "
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"::grpc::ServerWriter< $Response$>* /*writer*/) override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -975,8 +976,8 @@ void PrintHeaderServerCallbackMethodsHelper(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* stream) "
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) "
" override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -1006,7 +1007,8 @@ void PrintHeaderServerMethodCallback(
"class ExperimentalWithCallbackMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars, "ExperimentalWithCallbackMethod_$Method$() {\n");
@ -1080,7 +1082,8 @@ void PrintHeaderServerMethodRawCallback(
"BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars, "ExperimentalWithRawCallbackMethod_$Method$() {\n");
@ -1143,7 +1146,7 @@ void PrintHeaderServerMethodStreamedUnary(
"public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) "
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
@ -1164,8 +1167,8 @@ void PrintHeaderServerMethodStreamedUnary(
*vars,
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -1194,7 +1197,7 @@ void PrintHeaderServerMethodSplitStreaming(
"public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) "
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
@ -1216,8 +1219,8 @@ void PrintHeaderServerMethodSplitStreaming(
*vars,
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) override "
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"::grpc::ServerWriter< $Response$>* /*writer*/) override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -1245,7 +1248,8 @@ void PrintHeaderServerMethodGeneric(
"class WithGenericMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,
@ -1261,8 +1265,8 @@ void PrintHeaderServerMethodGeneric(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -1271,9 +1275,9 @@ void PrintHeaderServerMethodGeneric(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
"$Response$* response) override {\n"
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReader< $Request$>* /*reader*/, "
"$Response$* /*response*/) override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -1282,8 +1286,8 @@ void PrintHeaderServerMethodGeneric(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) override "
"::grpc::ServerContext* /*context*/, const $Request$* /*request*/, "
"::grpc::ServerWriter< $Response$>* /*writer*/) override "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -1293,8 +1297,8 @@ void PrintHeaderServerMethodGeneric(
*vars,
"// disable synchronous version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* stream) "
"::grpc::ServerContext* /*context*/, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) "
" override {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
@ -1318,7 +1322,8 @@ void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer,
printer->Print(*vars, "class WithRawMethod_$Method$ : public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) {}\n");
" void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,

@ -414,34 +414,24 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor* service) {
out->Print("\n");
}
void GenerateClientStub(Printer* out, const ServiceDescriptor* service,
bool lite_client) {
if (!lite_client) {
out->Print("/// <summary>Client for $servicename$</summary>\n",
"servicename", GetServiceClassName(service));
out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n",
"name", GetClientClassName(service));
} else {
out->Print("/// <summary>Lite client for $servicename$</summary>\n",
"servicename", GetServiceClassName(service));
out->Print("public partial class $name$ : grpc::LiteClientBase\n", "name",
GetClientClassName(service));
}
void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
out->Print("/// <summary>Client for $servicename$</summary>\n", "servicename",
GetServiceClassName(service));
out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n", "name",
GetClientClassName(service));
out->Print("{\n");
out->Indent();
// constructors
if (!lite_client) {
out->Print(
"/// <summary>Creates a new client for $servicename$</summary>\n"
"/// <param name=\"channel\">The channel to use to make remote "
"calls.</param>\n",
"servicename", GetServiceClassName(service));
out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Print("}\n");
}
out->Print(
"/// <summary>Creates a new client for $servicename$</summary>\n"
"/// <param name=\"channel\">The channel to use to make remote "
"calls.</param>\n",
"servicename", GetServiceClassName(service));
out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Print("}\n");
out->Print(
"/// <summary>Creates a new client for $servicename$ that uses a custom "
"<c>CallInvoker</c>.</summary>\n"
@ -460,20 +450,16 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service,
GetClientClassName(service));
out->Print("{\n");
out->Print("}\n");
if (!lite_client) {
out->Print(
"/// <summary>Protected constructor to allow creation of configured "
"clients.</summary>\n"
"/// <param name=\"configuration\">The client "
"configuration.</param>\n");
out->Print(
"protected $name$(ClientBaseConfiguration configuration)"
" : base(configuration)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Print("}\n");
}
out->Print("\n");
out->Print(
"/// <summary>Protected constructor to allow creation of configured "
"clients.</summary>\n"
"/// <param name=\"configuration\">The client configuration.</param>\n");
out->Print(
"protected $name$(ClientBaseConfiguration configuration)"
" : base(configuration)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Print("}\n\n");
for (int i = 0; i < service->method_count(); i++) {
const MethodDescriptor* method = service->method(i);
@ -591,21 +577,19 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service,
}
// override NewInstance method
if (!lite_client) {
out->Print(
"/// <summary>Creates a new instance of client from given "
"<c>ClientBaseConfiguration</c>.</summary>\n");
out->Print(
"protected override $name$ NewInstance(ClientBaseConfiguration "
"configuration)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Indent();
out->Print("return new $name$(configuration);\n", "name",
GetClientClassName(service));
out->Outdent();
out->Print("}\n");
}
out->Print(
"/// <summary>Creates a new instance of client from given "
"<c>ClientBaseConfiguration</c>.</summary>\n");
out->Print(
"protected override $name$ NewInstance(ClientBaseConfiguration "
"configuration)\n",
"name", GetClientClassName(service));
out->Print("{\n");
out->Indent();
out->Print("return new $name$(configuration);\n", "name",
GetClientClassName(service));
out->Outdent();
out->Print("}\n");
out->Outdent();
out->Print("}\n");
@ -687,7 +671,7 @@ void GenerateBindServiceWithBinderMethod(Printer* out,
void GenerateService(Printer* out, const ServiceDescriptor* service,
bool generate_client, bool generate_server,
bool internal_access, bool lite_client) {
bool internal_access) {
GenerateDocCommentBody(out, service);
out->Print("$access_level$ static partial class $classname$\n",
"access_level", GetAccessLevel(internal_access), "classname",
@ -709,9 +693,8 @@ void GenerateService(Printer* out, const ServiceDescriptor* service,
GenerateServerClass(out, service);
}
if (generate_client) {
GenerateClientStub(out, service, lite_client);
GenerateClientStub(out, service);
}
if (generate_server) {
GenerateBindServiceMethod(out, service);
GenerateBindServiceWithBinderMethod(out, service);
@ -724,8 +707,7 @@ void GenerateService(Printer* out, const ServiceDescriptor* service,
} // anonymous namespace
grpc::string GetServices(const FileDescriptor* file, bool generate_client,
bool generate_server, bool internal_access,
bool lite_client) {
bool generate_server, bool internal_access) {
grpc::string output;
{
// Scope the output stream so it closes and finalizes output to the string.
@ -767,7 +749,7 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client,
}
for (int i = 0; i < file->service_count(); i++) {
GenerateService(&out, file->service(i), generate_client, generate_server,
internal_access, lite_client);
internal_access);
}
if (file_namespace != "") {
out.Outdent();

@ -27,7 +27,7 @@ namespace grpc_csharp_generator {
grpc::string GetServices(const grpc::protobuf::FileDescriptor* file,
bool generate_client, bool generate_server,
bool internal_access, bool lite_client);
bool internal_access);
} // namespace grpc_csharp_generator

@ -39,7 +39,6 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
bool generate_client = true;
bool generate_server = true;
bool internal_access = false;
bool lite_client = false;
for (size_t i = 0; i < options.size(); i++) {
if (options[i].first == "no_client") {
generate_client = false;
@ -47,10 +46,6 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
generate_server = false;
} else if (options[i].first == "internal_access") {
internal_access = true;
} else if (options[i].first == "lite_client") {
// will only be used if generate_client is true.
// NOTE: experimental option, can be removed in future release
lite_client = true;
} else {
*error = "Unknown generator option: " + options[i].first;
return false;
@ -58,7 +53,7 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
}
grpc::string code = grpc_csharp_generator::GetServices(
file, generate_client, generate_server, internal_access, lite_client);
file, generate_client, generate_server, internal_access);
if (code.size() == 0) {
return true; // don't generate a file if there are no services
}

@ -756,6 +756,29 @@ static bool GenerateGrpc(GeneratorContext* context, PrivateGenerator& generator,
}
}
static bool ParseParameters(const grpc::string& parameter,
grpc::string* grpc_version,
std::vector<grpc::string>* strip_prefixes,
grpc::string* error) {
std::vector<grpc::string> comma_delimited_parameters;
grpc_python_generator::Split(parameter, ',', &comma_delimited_parameters);
if (comma_delimited_parameters.size() == 1 &&
comma_delimited_parameters[0].empty()) {
*grpc_version = "grpc_2_0";
} else if (comma_delimited_parameters.size() == 1) {
*grpc_version = comma_delimited_parameters[0];
} else if (comma_delimited_parameters.size() == 2) {
*grpc_version = comma_delimited_parameters[0];
std::copy(comma_delimited_parameters.begin() + 1,
comma_delimited_parameters.end(),
std::back_inserter(*strip_prefixes));
} else {
*error = "--grpc_python_out received too many comma-delimited parameters.";
return false;
}
return true;
}
bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
const grpc::string& parameter,
GeneratorContext* context,
@ -778,14 +801,19 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
generator_file_name = file->name();
ProtoBufFile pbfile(file);
PrivateGenerator generator(config_, &pbfile);
if (parameter == "" || parameter == "grpc_2_0") {
grpc::string grpc_version;
GeneratorConfiguration extended_config(config_);
bool success = ParseParameters(parameter, &grpc_version,
&(extended_config.prefixes_to_filter), error);
PrivateGenerator generator(extended_config, &pbfile);
if (!success) return false;
if (grpc_version == "grpc_2_0") {
return GenerateGrpc(context, generator, pb2_grpc_file_name, true);
} else if (parameter == "grpc_1_0") {
} else if (grpc_version == "grpc_1_0") {
return GenerateGrpc(context, generator, pb2_grpc_file_name, true) &&
GenerateGrpc(context, generator, pb2_file_name, false);
} else {
*error = "Invalid parameter '" + parameter + "'.";
*error = "Invalid grpc version '" + grpc_version + "'.";
return false;
}
}

@ -136,6 +136,16 @@ StringVector get_all_comments(const DescriptorType* descriptor) {
return comments;
}
inline void Split(const grpc::string& s, char delim,
std::vector<grpc::string>* append_to) {
auto current = s.begin();
while (current <= s.end()) {
auto next = std::find(current, s.end(), delim);
append_to->emplace_back(current, next);
current = next + 1;
}
}
} // namespace
} // namespace grpc_python_generator

@ -0,0 +1,78 @@
//
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/backend_metric.h"
#include "src/core/lib/gprpp/string_view.h"
#include "udpa/data/orca/v1/orca_load_report.upb.h"
namespace grpc_core {
namespace {
template <typename EntryType>
Map<StringView, double, StringLess> ParseMap(
udpa_data_orca_v1_OrcaLoadReport* msg,
EntryType** (*entry_func)(udpa_data_orca_v1_OrcaLoadReport*, size_t*),
upb_strview (*key_func)(const EntryType*),
double (*value_func)(const EntryType*), Arena* arena) {
Map<StringView, double, StringLess> result;
size_t size;
const auto* const* entries = entry_func(msg, &size);
for (size_t i = 0; i < size; ++i) {
upb_strview key_view = key_func(entries[i]);
char* key = static_cast<char*>(arena->Alloc(key_view.size + 1));
memcpy(key, key_view.data, key_view.size);
result[StringView(key, key_view.size)] = value_func(entries[i]);
}
return result;
}
} // namespace
const LoadBalancingPolicy::BackendMetricData* ParseBackendMetricData(
const grpc_slice& serialized_load_report, Arena* arena) {
upb::Arena upb_arena;
udpa_data_orca_v1_OrcaLoadReport* msg =
udpa_data_orca_v1_OrcaLoadReport_parse(
reinterpret_cast<const char*>(
GRPC_SLICE_START_PTR(serialized_load_report)),
GRPC_SLICE_LENGTH(serialized_load_report), upb_arena.ptr());
if (msg == nullptr) return nullptr;
LoadBalancingPolicy::BackendMetricData* backend_metric_data =
arena->New<LoadBalancingPolicy::BackendMetricData>();
backend_metric_data->cpu_utilization =
udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(msg);
backend_metric_data->mem_utilization =
udpa_data_orca_v1_OrcaLoadReport_mem_utilization(msg);
backend_metric_data->requests_per_second =
udpa_data_orca_v1_OrcaLoadReport_rps(msg);
backend_metric_data->request_cost =
ParseMap<udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry>(
msg, udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost,
udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key,
udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value, arena);
backend_metric_data->utilization =
ParseMap<udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry>(
msg, udpa_data_orca_v1_OrcaLoadReport_mutable_utilization,
udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key,
udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value, arena);
return backend_metric_data;
}
} // namespace grpc_core

@ -0,0 +1,36 @@
//
// Copyright 2019 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H
#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
#include "src/core/ext/filters/client_channel/lb_policy.h"
#include "src/core/lib/gprpp/arena.h"
namespace grpc_core {
// Parses the serialized load report and allocates a BackendMetricData
// object on the arena.
const LoadBalancingPolicy::BackendMetricData* ParseBackendMetricData(
const grpc_slice& serialized_load_report, Arena* arena);
} // namespace grpc_core
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H */

@ -31,6 +31,7 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include "src/core/ext/filters/client_channel/backend_metric.h"
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include "src/core/ext/filters/client_channel/global_subchannel_pool.h"
#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
@ -129,7 +130,7 @@ class ChannelData {
return disconnect_error_.Load(MemoryOrder::ACQUIRE);
}
grpc_combiner* data_plane_combiner() const { return data_plane_combiner_; }
Mutex* data_plane_mu() const { return &data_plane_mu_; }
LoadBalancingPolicy::SubchannelPicker* picker() const {
return picker_.get();
@ -165,8 +166,6 @@ class ChannelData {
private:
class SubchannelWrapper;
class ConnectivityStateAndPickerSetter;
class ServiceConfigSetter;
class ClientChannelControlHelper;
class ExternalConnectivityWatcher {
@ -213,6 +212,14 @@ class ChannelData {
ChannelData(grpc_channel_element_args* args, grpc_error** error);
~ChannelData();
void UpdateStateAndPickerLocked(
grpc_connectivity_state state, const char* reason,
UniquePtr<LoadBalancingPolicy::SubchannelPicker> picker);
void UpdateServiceConfigLocked(
RefCountedPtr<ServerRetryThrottleData> retry_throttle_data,
RefCountedPtr<ServiceConfig> service_config);
void CreateResolvingLoadBalancingPolicyLocked();
void DestroyResolvingLoadBalancingPolicyLocked();
@ -249,9 +256,9 @@ class ChannelData {
channelz::ChannelNode* channelz_node_;
//
// Fields used in the data plane. Guarded by data_plane_combiner.
// Fields used in the data plane. Guarded by data_plane_mu.
//
grpc_combiner* data_plane_combiner_;
mutable Mutex data_plane_mu_;
UniquePtr<LoadBalancingPolicy::SubchannelPicker> picker_;
QueuedPick* queued_picks_ = nullptr; // Linked list of queued picks.
// Data from service config.
@ -273,15 +280,21 @@ class ChannelData {
bool received_first_resolver_result_ = false;
// The number of SubchannelWrapper instances referencing a given Subchannel.
Map<Subchannel*, int> subchannel_refcount_map_;
// The set of SubchannelWrappers that currently exist.
// No need to hold a ref, since the map is updated in the control-plane
// combiner when the SubchannelWrappers are created and destroyed.
// TODO(roth): We really want to use a set here, not a map. Since we don't
// currently have a set implementation, we use a map and ignore the value.
Map<SubchannelWrapper*, bool> subchannel_wrappers_;
// Pending ConnectedSubchannel updates for each SubchannelWrapper.
// Updates are queued here in the control plane combiner and then applied
// in the data plane combiner when the picker is updated.
// in the data plane mutex when the picker is updated.
Map<RefCountedPtr<SubchannelWrapper>, RefCountedPtr<ConnectedSubchannel>,
RefCountedPtrLess<SubchannelWrapper>>
pending_subchannel_updates_;
//
// Fields accessed from both data plane and control plane combiners.
// Fields accessed from both data plane mutex and control plane combiner.
//
Atomic<grpc_error*> disconnect_error_;
@ -315,7 +328,16 @@ class CallData {
void MaybeApplyServiceConfigToCallLocked(grpc_call_element* elem);
// Invoked by channel for queued picks when the picker is updated.
static void StartPickLocked(void* arg, grpc_error* error);
static void PickSubchannel(void* arg, grpc_error* error);
// Helper function for performing a pick while holding the data plane
// mutex. Returns true if the pick is complete, in which case the caller
// must invoke PickDone() or AsyncPickDone() with the returned error.
bool PickSubchannelLocked(grpc_call_element* elem, grpc_error** error);
// Schedules a callback to process the completed pick. The callback
// will not run until after this method returns.
void AsyncPickDone(grpc_call_element* elem, grpc_error* error);
private:
class QueuedPickCanceller;
@ -374,6 +396,19 @@ class CallData {
void* Alloc(size_t size) override { return calld_->arena_->Alloc(size); }
const LoadBalancingPolicy::BackendMetricData* GetBackendMetricData()
override {
if (calld_->backend_metric_data_ == nullptr) {
grpc_linked_mdelem* md = calld_->recv_trailing_metadata_->idx.named
.x_endpoint_load_metrics_bin;
if (md != nullptr) {
calld_->backend_metric_data_ =
ParseBackendMetricData(GRPC_MDVALUE(md->md), calld_->arena_);
}
}
return calld_->backend_metric_data_;
}
private:
CallData* calld_;
};
@ -706,6 +741,7 @@ class CallData {
bool service_config_applied_ = false;
QueuedPickCanceller* pick_canceller_ = nullptr;
LbCallState lb_call_state_;
const LoadBalancingPolicy::BackendMetricData* backend_metric_data_ = nullptr;
RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
void (*lb_recv_trailing_metadata_ready_)(
void* user_data, grpc_error* error,
@ -799,14 +835,14 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "SubchannelWrapper");
auto* subchannel_node = subchannel_->channelz_node();
if (subchannel_node != nullptr) {
intptr_t subchannel_uuid = subchannel_node->uuid();
auto it = chand_->subchannel_refcount_map_.find(subchannel_);
if (it == chand_->subchannel_refcount_map_.end()) {
chand_->channelz_node_->AddChildSubchannel(subchannel_uuid);
chand_->channelz_node_->AddChildSubchannel(subchannel_node->uuid());
it = chand_->subchannel_refcount_map_.emplace(subchannel_, 0).first;
}
++it->second;
}
chand_->subchannel_wrappers_[this] = true;
}
~SubchannelWrapper() {
@ -815,14 +851,14 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
"chand=%p: destroying subchannel wrapper %p for subchannel %p",
chand_, this, subchannel_);
}
chand_->subchannel_wrappers_.erase(this);
auto* subchannel_node = subchannel_->channelz_node();
if (subchannel_node != nullptr) {
intptr_t subchannel_uuid = subchannel_node->uuid();
auto it = chand_->subchannel_refcount_map_.find(subchannel_);
GPR_ASSERT(it != chand_->subchannel_refcount_map_.end());
--it->second;
if (it->second == 0) {
chand_->channelz_node_->RemoveChildSubchannel(subchannel_uuid);
chand_->channelz_node_->RemoveChildSubchannel(subchannel_node->uuid());
chand_->subchannel_refcount_map_.erase(it);
}
}
@ -844,8 +880,9 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
UniquePtr<ConnectivityStateWatcherInterface> watcher) override {
auto& watcher_wrapper = watcher_map_[watcher.get()];
GPR_ASSERT(watcher_wrapper == nullptr);
watcher_wrapper = New<WatcherWrapper>(
std::move(watcher), Ref(DEBUG_LOCATION, "WatcherWrapper"));
watcher_wrapper = New<WatcherWrapper>(std::move(watcher),
Ref(DEBUG_LOCATION, "WatcherWrapper"),
initial_state);
subchannel_->WatchConnectivityState(
initial_state,
UniquePtr<char>(gpr_strdup(health_check_service_name_.get())),
@ -870,12 +907,46 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
return subchannel_->channel_args();
}
void UpdateHealthCheckServiceName(UniquePtr<char> health_check_service_name) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: subchannel wrapper %p: updating health check service "
"name from \"%s\" to \"%s\"",
chand_, this, health_check_service_name_.get(),
health_check_service_name.get());
}
for (auto& p : watcher_map_) {
WatcherWrapper*& watcher_wrapper = p.second;
// Cancel the current watcher and create a new one using the new
// health check service name.
// TODO(roth): If there is not already an existing health watch
// call for the new name, then the watcher will initially report
// state CONNECTING. If the LB policy is currently reporting
// state READY, this may cause it to switch to CONNECTING before
// switching back to READY. This could cause a small delay for
// RPCs being started on the channel. If/when this becomes a
// problem, we may be able to handle it by waiting for the new
// watcher to report READY before we use it to replace the old one.
WatcherWrapper* replacement = watcher_wrapper->MakeReplacement();
subchannel_->CancelConnectivityStateWatch(
health_check_service_name_.get(), watcher_wrapper);
watcher_wrapper = replacement;
subchannel_->WatchConnectivityState(
replacement->last_seen_state(),
UniquePtr<char>(gpr_strdup(health_check_service_name.get())),
OrphanablePtr<Subchannel::ConnectivityStateWatcherInterface>(
replacement));
}
// Save the new health check service name.
health_check_service_name_ = std::move(health_check_service_name);
}
// Caller must be holding the control-plane combiner.
ConnectedSubchannel* connected_subchannel() const {
return connected_subchannel_.get();
}
// Caller must be holding the data-plane combiner.
// Caller must be holding the data-plane mutex.
ConnectedSubchannel* connected_subchannel_in_data_plane() const {
return connected_subchannel_in_data_plane_.get();
}
@ -904,8 +975,11 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
WatcherWrapper(
UniquePtr<SubchannelInterface::ConnectivityStateWatcherInterface>
watcher,
RefCountedPtr<SubchannelWrapper> parent)
: watcher_(std::move(watcher)), parent_(std::move(parent)) {}
RefCountedPtr<SubchannelWrapper> parent,
grpc_connectivity_state initial_state)
: watcher_(std::move(watcher)),
parent_(std::move(parent)),
last_seen_state_(initial_state) {}
~WatcherWrapper() { parent_.reset(DEBUG_LOCATION, "WatcherWrapper"); }
@ -928,9 +1002,21 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
}
grpc_pollset_set* interested_parties() override {
return watcher_->interested_parties();
SubchannelInterface::ConnectivityStateWatcherInterface* watcher =
watcher_.get();
if (watcher_ == nullptr) watcher = replacement_->watcher_.get();
return watcher->interested_parties();
}
WatcherWrapper* MakeReplacement() {
auto* replacement =
New<WatcherWrapper>(std::move(watcher_), parent_, last_seen_state_);
replacement_ = replacement;
return replacement;
}
grpc_connectivity_state last_seen_state() const { return last_seen_state_; }
private:
class Updater {
public:
@ -954,12 +1040,17 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
gpr_log(GPR_INFO,
"chand=%p: processing connectivity change in combiner "
"for subchannel wrapper %p subchannel %p "
"(connected_subchannel=%p state=%s)",
"(connected_subchannel=%p state=%s): watcher=%p",
self->parent_->parent_->chand_, self->parent_->parent_.get(),
self->parent_->parent_->subchannel_,
self->connected_subchannel_.get(),
grpc_connectivity_state_name(self->state_));
grpc_connectivity_state_name(self->state_),
self->parent_->watcher_.get());
}
// Ignore update if the parent WatcherWrapper has been replaced
// since this callback was scheduled.
if (self->parent_->watcher_ == nullptr) return;
self->parent_->last_seen_state_ = self->state_;
self->parent_->parent_->MaybeUpdateConnectedSubchannel(
std::move(self->connected_subchannel_));
self->parent_->watcher_->OnConnectivityStateChange(self->state_);
@ -974,6 +1065,8 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
UniquePtr<SubchannelInterface::ConnectivityStateWatcherInterface> watcher_;
RefCountedPtr<SubchannelWrapper> parent_;
grpc_connectivity_state last_seen_state_;
WatcherWrapper* replacement_ = nullptr;
};
void MaybeUpdateConnectedSubchannel(
@ -981,7 +1074,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
// Update the connected subchannel only if the channel is not shutting
// down. This is because once the channel is shutting down, we
// ignore picker updates from the LB policy, which means that
// ConnectivityStateAndPickerSetter will never process the entries
// UpdateStateAndPickerLocked() will never process the entries
// in chand_->pending_subchannel_updates_. So we don't want to add
// entries there that will never be processed, since that would
// leave dangling refs to the channel and prevent its destruction.
@ -991,7 +1084,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
if (connected_subchannel_ != connected_subchannel) {
connected_subchannel_ = std::move(connected_subchannel);
// Record the new connected subchannel so that it can be updated
// in the data plane combiner the next time the picker is updated.
// in the data plane mutex the next time the picker is updated.
chand_->pending_subchannel_updates_[Ref(
DEBUG_LOCATION, "ConnectedSubchannelUpdate")] = connected_subchannel_;
}
@ -1008,159 +1101,10 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
Map<ConnectivityStateWatcherInterface*, WatcherWrapper*> watcher_map_;
// To be accessed only in the control plane combiner.
RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
// To be accessed only in the data plane combiner.
// To be accessed only in the data plane mutex.
RefCountedPtr<ConnectedSubchannel> connected_subchannel_in_data_plane_;
};
//
// ChannelData::ConnectivityStateAndPickerSetter
//
// A fire-and-forget class that sets the channel's connectivity state
// and then hops into the data plane combiner to update the picker.
// Must be instantiated while holding the control plane combiner.
// Deletes itself when done.
class ChannelData::ConnectivityStateAndPickerSetter {
public:
ConnectivityStateAndPickerSetter(
ChannelData* chand, grpc_connectivity_state state, const char* reason,
UniquePtr<LoadBalancingPolicy::SubchannelPicker> picker)
: chand_(chand), picker_(std::move(picker)) {
// Clean the control plane when entering IDLE, while holding control plane
// combiner.
if (picker_ == nullptr) {
chand->health_check_service_name_.reset();
chand->saved_service_config_.reset();
chand->received_first_resolver_result_ = false;
}
// Update connectivity state here, while holding control plane combiner.
grpc_connectivity_state_set(&chand->state_tracker_, state, reason);
if (chand->channelz_node_ != nullptr) {
chand->channelz_node_->SetConnectivityState(state);
chand->channelz_node_->AddTraceEvent(
channelz::ChannelTrace::Severity::Info,
grpc_slice_from_static_string(
channelz::ChannelNode::GetChannelConnectivityStateChangeString(
state)));
}
// Grab any pending subchannel updates.
pending_subchannel_updates_ =
std::move(chand_->pending_subchannel_updates_);
// Bounce into the data plane combiner to reset the picker.
GRPC_CHANNEL_STACK_REF(chand->owning_stack_,
"ConnectivityStateAndPickerSetter");
GRPC_CLOSURE_INIT(&closure_, SetPickerInDataPlane, this,
grpc_combiner_scheduler(chand->data_plane_combiner_));
GRPC_CLOSURE_SCHED(&closure_, GRPC_ERROR_NONE);
}
private:
static void SetPickerInDataPlane(void* arg, grpc_error* ignored) {
auto* self = static_cast<ConnectivityStateAndPickerSetter*>(arg);
// Handle subchannel updates.
for (auto& p : self->pending_subchannel_updates_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: updating subchannel wrapper %p data plane "
"connected_subchannel to %p",
self->chand_, p.first.get(), p.second.get());
}
p.first->set_connected_subchannel_in_data_plane(std::move(p.second));
}
// Swap out the picker. We hang on to the old picker so that it can
// be deleted in the control-plane combiner, since that's where we need
// to unref the subchannel wrappers that are reffed by the picker.
self->picker_.swap(self->chand_->picker_);
// Clean the data plane if the updated picker is nullptr.
if (self->chand_->picker_ == nullptr) {
self->chand_->received_service_config_data_ = false;
self->chand_->retry_throttle_data_.reset();
self->chand_->service_config_.reset();
}
// Re-process queued picks.
for (QueuedPick* pick = self->chand_->queued_picks_; pick != nullptr;
pick = pick->next) {
CallData::StartPickLocked(pick->elem, GRPC_ERROR_NONE);
}
// Pop back into the control plane combiner to delete ourself, so
// that we make sure to unref subchannel wrappers there. This
// includes both the ones reffed by the old picker (now stored in
// self->picker_) and the ones in self->pending_subchannel_updates_.
GRPC_CLOSURE_INIT(&self->closure_, CleanUpInControlPlane, self,
grpc_combiner_scheduler(self->chand_->combiner_));
GRPC_CLOSURE_SCHED(&self->closure_, GRPC_ERROR_NONE);
}
static void CleanUpInControlPlane(void* arg, grpc_error* ignored) {
auto* self = static_cast<ConnectivityStateAndPickerSetter*>(arg);
GRPC_CHANNEL_STACK_UNREF(self->chand_->owning_stack_,
"ConnectivityStateAndPickerSetter");
Delete(self);
}
ChannelData* chand_;
UniquePtr<LoadBalancingPolicy::SubchannelPicker> picker_;
Map<RefCountedPtr<SubchannelWrapper>, RefCountedPtr<ConnectedSubchannel>,
RefCountedPtrLess<SubchannelWrapper>>
pending_subchannel_updates_;
grpc_closure closure_;
};
//
// ChannelData::ServiceConfigSetter
//
// A fire-and-forget class that sets the channel's service config data
// in the data plane combiner. Deletes itself when done.
class ChannelData::ServiceConfigSetter {
public:
ServiceConfigSetter(
ChannelData* chand,
Optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
retry_throttle_data,
RefCountedPtr<ServiceConfig> service_config)
: chand_(chand),
retry_throttle_data_(retry_throttle_data),
service_config_(std::move(service_config)) {
GRPC_CHANNEL_STACK_REF(chand->owning_stack_, "ServiceConfigSetter");
GRPC_CLOSURE_INIT(&closure_, SetServiceConfigData, this,
grpc_combiner_scheduler(chand->data_plane_combiner_));
GRPC_CLOSURE_SCHED(&closure_, GRPC_ERROR_NONE);
}
private:
static void SetServiceConfigData(void* arg, grpc_error* ignored) {
ServiceConfigSetter* self = static_cast<ServiceConfigSetter*>(arg);
ChannelData* chand = self->chand_;
// Update channel state.
chand->received_service_config_data_ = true;
if (self->retry_throttle_data_.has_value()) {
chand->retry_throttle_data_ =
internal::ServerRetryThrottleMap::GetDataForServer(
chand->server_name_.get(),
self->retry_throttle_data_.value().max_milli_tokens,
self->retry_throttle_data_.value().milli_token_ratio);
}
chand->service_config_ = std::move(self->service_config_);
// Apply service config to queued picks.
for (QueuedPick* pick = chand->queued_picks_; pick != nullptr;
pick = pick->next) {
CallData* calld = static_cast<CallData*>(pick->elem->call_data);
calld->MaybeApplyServiceConfigToCallLocked(pick->elem);
}
// Clean up.
GRPC_CHANNEL_STACK_UNREF(self->chand_->owning_stack_,
"ServiceConfigSetter");
Delete(self);
}
ChannelData* chand_;
Optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
retry_throttle_data_;
RefCountedPtr<ServiceConfig> service_config_;
grpc_closure closure_;
};
//
// ChannelData::ExternalConnectivityWatcher::WatcherList
//
@ -1331,9 +1275,7 @@ class ChannelData::ClientChannelControlHelper
}
// Do update only if not shutting down.
if (disconnect_error == GRPC_ERROR_NONE) {
// Will delete itself.
New<ConnectivityStateAndPickerSetter>(chand_, state, "helper",
std::move(picker));
chand_->UpdateStateAndPickerLocked(state, "helper", std::move(picker));
}
}
@ -1417,7 +1359,6 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error)
client_channel_factory_(
ClientChannelFactory::GetFromChannelArgs(args->channel_args)),
channelz_node_(GetChannelzNode(args->channel_args)),
data_plane_combiner_(grpc_combiner_create()),
combiner_(grpc_combiner_create()),
interested_parties_(grpc_pollset_set_create()),
subchannel_pool_(GetSubchannelPool(args->channel_args)),
@ -1490,13 +1431,108 @@ ChannelData::~ChannelData() {
// Stop backup polling.
grpc_client_channel_stop_backup_polling(interested_parties_);
grpc_pollset_set_destroy(interested_parties_);
GRPC_COMBINER_UNREF(data_plane_combiner_, "client_channel");
GRPC_COMBINER_UNREF(combiner_, "client_channel");
GRPC_ERROR_UNREF(disconnect_error_.Load(MemoryOrder::RELAXED));
grpc_connectivity_state_destroy(&state_tracker_);
gpr_mu_destroy(&info_mu_);
}
void ChannelData::UpdateStateAndPickerLocked(
grpc_connectivity_state state, const char* reason,
UniquePtr<LoadBalancingPolicy::SubchannelPicker> picker) {
// Clean the control plane when entering IDLE.
if (picker_ == nullptr) {
health_check_service_name_.reset();
saved_service_config_.reset();
received_first_resolver_result_ = false;
}
// Update connectivity state.
grpc_connectivity_state_set(&state_tracker_, state, reason);
if (channelz_node_ != nullptr) {
channelz_node_->SetConnectivityState(state);
channelz_node_->AddTraceEvent(
channelz::ChannelTrace::Severity::Info,
grpc_slice_from_static_string(
channelz::ChannelNode::GetChannelConnectivityStateChangeString(
state)));
}
// Grab data plane lock to do subchannel updates and update the picker.
//
// Note that we want to minimize the work done while holding the data
// plane lock, to keep the critical section small. So, for all of the
// objects that we might wind up unreffing here, we actually hold onto
// the refs until after we release the lock, and then unref them at
// that point. This includes the following:
// - refs to subchannel wrappers in the keys of pending_subchannel_updates_
// - ref stored in retry_throttle_data_
// - ref stored in service_config_
// - ownership of the existing picker in picker_
RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_to_unref;
RefCountedPtr<ServiceConfig> service_config_to_unref;
{
MutexLock lock(&data_plane_mu_);
// Handle subchannel updates.
for (auto& p : pending_subchannel_updates_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: updating subchannel wrapper %p data plane "
"connected_subchannel to %p",
this, p.first.get(), p.second.get());
}
// Note: We do not remove the entry from pending_subchannel_updates_
// here, since this would unref the subchannel wrapper; instead,
// we wait until we've released the lock to clear the map.
p.first->set_connected_subchannel_in_data_plane(std::move(p.second));
}
// Swap out the picker.
// Note: Original value will be destroyed after the lock is released.
picker_.swap(picker);
// Clean the data plane if the updated picker is nullptr.
if (picker_ == nullptr) {
received_service_config_data_ = false;
// Note: We save the objects to unref until after the lock is released.
retry_throttle_data_to_unref = std::move(retry_throttle_data_);
service_config_to_unref = std::move(service_config_);
}
// Re-process queued picks.
for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) {
grpc_call_element* elem = pick->elem;
CallData* calld = static_cast<CallData*>(elem->call_data);
grpc_error* error = GRPC_ERROR_NONE;
if (calld->PickSubchannelLocked(elem, &error)) {
calld->AsyncPickDone(elem, error);
}
}
}
// Clear the pending update map after releasing the lock, to keep the
// critical section small.
pending_subchannel_updates_.clear();
}
void ChannelData::UpdateServiceConfigLocked(
RefCountedPtr<ServerRetryThrottleData> retry_throttle_data,
RefCountedPtr<ServiceConfig> service_config) {
// Grab data plane lock to update service config.
//
// We defer unreffing the old values (and deallocating memory) until
// after releasing the lock to keep the critical section small.
{
MutexLock lock(&data_plane_mu_);
// Update service config.
received_service_config_data_ = true;
// Old values will be unreffed after lock is released.
retry_throttle_data_.swap(retry_throttle_data);
service_config_.swap(service_config);
// Apply service config to queued picks.
for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) {
CallData* calld = static_cast<CallData*>(pick->elem->call_data);
calld->MaybeApplyServiceConfigToCallLocked(pick->elem);
}
}
// Old values will be unreffed after lock is released when they go out
// of scope.
}
void ChannelData::CreateResolvingLoadBalancingPolicyLocked() {
// Instantiate resolving LB policy.
LoadBalancingPolicy::Args lb_args;
@ -1655,6 +1691,11 @@ bool ChannelData::ProcessResolverResultLocked(
} else {
chand->health_check_service_name_.reset();
}
// Update health check service name used by existing subchannel wrappers.
for (const auto& p : chand->subchannel_wrappers_) {
p.first->UpdateHealthCheckServiceName(
UniquePtr<char>(gpr_strdup(chand->health_check_service_name_.get())));
}
// Save service config.
chand->saved_service_config_ = std::move(service_config);
}
@ -1663,15 +1704,20 @@ bool ChannelData::ProcessResolverResultLocked(
// if we feel it is unnecessary.
if (service_config_changed || !chand->received_first_resolver_result_) {
chand->received_first_resolver_result_ = true;
Optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
retry_throttle_data;
RefCountedPtr<ServerRetryThrottleData> retry_throttle_data;
if (parsed_service_config != nullptr) {
retry_throttle_data = parsed_service_config->retry_throttling();
Optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
retry_throttle_config = parsed_service_config->retry_throttling();
if (retry_throttle_config.has_value()) {
retry_throttle_data =
internal::ServerRetryThrottleMap::GetDataForServer(
chand->server_name_.get(),
retry_throttle_config.value().max_milli_tokens,
retry_throttle_config.value().milli_token_ratio);
}
}
// Create service config setter to update channel state in the data
// plane combiner. Destroys itself when done.
New<ServiceConfigSetter>(chand, retry_throttle_data,
chand->saved_service_config_);
chand->UpdateServiceConfigLocked(std::move(retry_throttle_data),
chand->saved_service_config_);
}
UniquePtr<char> processed_lb_policy_name;
chand->ProcessLbPolicy(result, parsed_service_config,
@ -1755,8 +1801,8 @@ void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) {
static_cast<grpc_connectivity_state>(value) == GRPC_CHANNEL_IDLE) {
if (chand->disconnect_error() == GRPC_ERROR_NONE) {
// Enter IDLE state.
New<ConnectivityStateAndPickerSetter>(chand, GRPC_CHANNEL_IDLE,
"channel entering IDLE", nullptr);
chand->UpdateStateAndPickerLocked(GRPC_CHANNEL_IDLE,
"channel entering IDLE", nullptr);
}
GRPC_ERROR_UNREF(op->disconnect_with_error);
} else {
@ -1765,8 +1811,8 @@ void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) {
GRPC_ERROR_NONE);
chand->disconnect_error_.Store(op->disconnect_with_error,
MemoryOrder::RELEASE);
New<ConnectivityStateAndPickerSetter>(
chand, GRPC_CHANNEL_SHUTDOWN, "shutdown from API",
chand->UpdateStateAndPickerLocked(
GRPC_CHANNEL_SHUTDOWN, "shutdown from API",
UniquePtr<LoadBalancingPolicy::SubchannelPicker>(
New<LoadBalancingPolicy::TransientFailurePicker>(
GRPC_ERROR_REF(op->disconnect_with_error))));
@ -1927,6 +1973,10 @@ CallData::CallData(grpc_call_element* elem, const ChannelData& chand,
CallData::~CallData() {
grpc_slice_unref_internal(path_);
GRPC_ERROR_UNREF(cancel_error_);
if (backend_metric_data_ != nullptr) {
backend_metric_data_
->LoadBalancingPolicy::BackendMetricData::~BackendMetricData();
}
// Make sure there are no remaining pending batches.
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
GPR_ASSERT(pending_batches_[i].batch == nullptr);
@ -2005,8 +2055,8 @@ void CallData::StartTransportStreamOpBatch(
// Add the batch to the pending list.
calld->PendingBatchesAdd(elem, batch);
// Check if we've already gotten a subchannel call.
// Note that once we have completed the pick, we do not need to enter
// the channel combiner, which is more efficient (especially for
// Note that once we have picked a subchannel, we do not need to acquire
// the channel's data plane mutex, which is more efficient (especially for
// streaming calls).
if (calld->subchannel_call_ != nullptr) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@ -2018,18 +2068,15 @@ void CallData::StartTransportStreamOpBatch(
return;
}
// We do not yet have a subchannel call.
// For batches containing a send_initial_metadata op, enter the channel
// combiner to start a pick.
// For batches containing a send_initial_metadata op, acquire the
// channel's data plane mutex to pick a subchannel.
if (GPR_LIKELY(batch->send_initial_metadata)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO, "chand=%p calld=%p: entering client_channel combiner",
gpr_log(GPR_INFO,
"chand=%p calld=%p: grabbing data plane mutex to perform pick",
chand, calld);
}
GRPC_CLOSURE_SCHED(
GRPC_CLOSURE_INIT(
&batch->handler_private.closure, StartPickLocked, elem,
grpc_combiner_scheduler(chand->data_plane_combiner())),
GRPC_ERROR_NONE);
PickSubchannel(elem, GRPC_ERROR_NONE);
} else {
// For all other batches, release the call combiner.
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@ -2457,8 +2504,8 @@ void CallData::DoRetry(grpc_call_element* elem,
this, next_attempt_time - ExecCtx::Get()->Now());
}
// Schedule retry after computed delay.
GRPC_CLOSURE_INIT(&pick_closure_, StartPickLocked, elem,
grpc_combiner_scheduler(chand->data_plane_combiner()));
GRPC_CLOSURE_INIT(&pick_closure_, PickSubchannel, elem,
grpc_schedule_on_exec_ctx);
grpc_timer_init(&retry_timer_, next_attempt_time, &pick_closure_);
// Update bookkeeping.
if (retry_state != nullptr) retry_state->retry_dispatched = true;
@ -3573,6 +3620,11 @@ void CallData::CreateSubchannelCall(grpc_call_element* elem) {
}
}
void CallData::AsyncPickDone(grpc_call_element* elem, grpc_error* error) {
GRPC_CLOSURE_INIT(&pick_closure_, PickDone, elem, grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_SCHED(&pick_closure_, error);
}
void CallData::PickDone(void* arg, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
@ -3595,10 +3647,9 @@ class CallData::QueuedPickCanceller {
public:
explicit QueuedPickCanceller(grpc_call_element* elem) : elem_(elem) {
auto* calld = static_cast<CallData*>(elem->call_data);
auto* chand = static_cast<ChannelData*>(elem->channel_data);
GRPC_CALL_STACK_REF(calld->owning_call_, "QueuedPickCanceller");
GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this,
grpc_combiner_scheduler(chand->data_plane_combiner()));
grpc_schedule_on_exec_ctx);
calld->call_combiner_->SetNotifyOnCancel(&closure_);
}
@ -3607,6 +3658,7 @@ class CallData::QueuedPickCanceller {
auto* self = static_cast<QueuedPickCanceller*>(arg);
auto* chand = static_cast<ChannelData*>(self->elem_->channel_data);
auto* calld = static_cast<CallData*>(self->elem_->call_data);
MutexLock lock(chand->data_plane_mu());
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p calld=%p: cancelling queued pick: "
@ -3731,23 +3783,38 @@ const char* PickResultTypeName(
GPR_UNREACHABLE_CODE(return "UNKNOWN");
}
void CallData::StartPickLocked(void* arg, grpc_error* error) {
void CallData::PickSubchannel(void* arg, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
CallData* calld = static_cast<CallData*>(elem->call_data);
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
GPR_ASSERT(calld->connected_subchannel_ == nullptr);
GPR_ASSERT(calld->subchannel_call_ == nullptr);
// picker's being null means the channel is currently in IDLE state. The
// incoming call will make the channel exit IDLE and queue itself.
bool pick_complete;
{
MutexLock lock(chand->data_plane_mu());
pick_complete = calld->PickSubchannelLocked(elem, &error);
}
if (pick_complete) {
PickDone(elem, error);
GRPC_ERROR_UNREF(error);
}
}
bool CallData::PickSubchannelLocked(grpc_call_element* elem,
grpc_error** error) {
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
GPR_ASSERT(connected_subchannel_ == nullptr);
GPR_ASSERT(subchannel_call_ == nullptr);
// The picker being null means that the channel is currently in IDLE state.
// The incoming call will make the channel exit IDLE.
if (chand->picker() == nullptr) {
// We are currently in the data plane.
// Bounce into the control plane to exit IDLE.
chand->CheckConnectivityState(true);
calld->AddCallToQueuedPicksLocked(elem);
return;
// Bounce into the control plane combiner to exit IDLE.
chand->CheckConnectivityState(/*try_to_connect=*/true);
// Queue the pick, so that it will be attempted once the channel
// becomes connected.
AddCallToQueuedPicksLocked(elem);
return false;
}
// Apply service config to call if needed.
calld->MaybeApplyServiceConfigToCallLocked(elem);
MaybeApplyServiceConfigToCallLocked(elem);
// If this is a retry, use the send_initial_metadata payload that
// we've cached; otherwise, use the pending batch. The
// send_initial_metadata batch will be the first pending batch in the
@ -3759,31 +3826,27 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) {
// subchannel's copy of the metadata batch (which is copied for each
// attempt) to the LB policy instead the one from the parent channel.
LoadBalancingPolicy::PickArgs pick_args;
pick_args.call_state = &calld->lb_call_state_;
pick_args.call_state = &lb_call_state_;
Metadata initial_metadata(
calld,
calld->seen_send_initial_metadata_
? &calld->send_initial_metadata_
: calld->pending_batches_[0]
this,
seen_send_initial_metadata_
? &send_initial_metadata_
: pending_batches_[0]
.batch->payload->send_initial_metadata.send_initial_metadata);
pick_args.initial_metadata = &initial_metadata;
// Grab initial metadata flags so that we can check later if the call has
// wait_for_ready enabled.
const uint32_t send_initial_metadata_flags =
calld->seen_send_initial_metadata_
? calld->send_initial_metadata_flags_
: calld->pending_batches_[0]
.batch->payload->send_initial_metadata
.send_initial_metadata_flags;
// When done, we schedule this closure to leave the data plane combiner.
GRPC_CLOSURE_INIT(&calld->pick_closure_, PickDone, elem,
grpc_schedule_on_exec_ctx);
seen_send_initial_metadata_ ? send_initial_metadata_flags_
: pending_batches_[0]
.batch->payload->send_initial_metadata
.send_initial_metadata_flags;
// Attempt pick.
auto result = chand->picker()->Pick(pick_args);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p calld=%p: LB pick returned %s (subchannel=%p, error=%s)",
chand, calld, PickResultTypeName(result.type),
chand, this, PickResultTypeName(result.type),
result.subchannel.get(), grpc_error_string(result.error));
}
switch (result.type) {
@ -3792,9 +3855,9 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) {
grpc_error* disconnect_error = chand->disconnect_error();
if (disconnect_error != GRPC_ERROR_NONE) {
GRPC_ERROR_UNREF(result.error);
GRPC_CLOSURE_SCHED(&calld->pick_closure_,
GRPC_ERROR_REF(disconnect_error));
break;
if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem);
*error = GRPC_ERROR_REF(disconnect_error);
return true;
}
// If wait_for_ready is false, then the error indicates the RPC
// attempt's final status.
@ -3802,19 +3865,20 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) {
GRPC_INITIAL_METADATA_WAIT_FOR_READY) == 0) {
// Retry if appropriate; otherwise, fail.
grpc_status_code status = GRPC_STATUS_OK;
grpc_error_get_status(result.error, calld->deadline_, &status, nullptr,
grpc_error_get_status(result.error, deadline_, &status, nullptr,
nullptr, nullptr);
if (!calld->enable_retries_ ||
!calld->MaybeRetry(elem, nullptr /* batch_data */, status,
nullptr /* server_pushback_md */)) {
const bool retried = enable_retries_ &&
MaybeRetry(elem, nullptr /* batch_data */, status,
nullptr /* server_pushback_md */);
if (!retried) {
grpc_error* new_error =
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"Failed to pick subchannel", &result.error, 1);
GRPC_ERROR_UNREF(result.error);
GRPC_CLOSURE_SCHED(&calld->pick_closure_, new_error);
*error = new_error;
}
if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem);
break;
if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem);
return !retried;
}
// If wait_for_ready is true, then queue to retry when we get a new
// picker.
@ -3822,26 +3886,26 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) {
}
// Fallthrough
case LoadBalancingPolicy::PickResult::PICK_QUEUE:
if (!calld->pick_queued_) calld->AddCallToQueuedPicksLocked(elem);
break;
if (!pick_queued_) AddCallToQueuedPicksLocked(elem);
return false;
default: // PICK_COMPLETE
if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem);
// Handle drops.
if (GPR_UNLIKELY(result.subchannel == nullptr)) {
result.error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Call dropped by load balancing policy");
} else {
// Grab a ref to the connected subchannel while we're still
// holding the data plane combiner.
calld->connected_subchannel_ =
// holding the data plane mutex.
connected_subchannel_ =
chand->GetConnectedSubchannelInDataPlane(result.subchannel.get());
GPR_ASSERT(calld->connected_subchannel_ != nullptr);
GPR_ASSERT(connected_subchannel_ != nullptr);
}
calld->lb_recv_trailing_metadata_ready_ =
result.recv_trailing_metadata_ready;
calld->lb_recv_trailing_metadata_ready_user_data_ =
lb_recv_trailing_metadata_ready_ = result.recv_trailing_metadata_ready;
lb_recv_trailing_metadata_ready_user_data_ =
result.recv_trailing_metadata_ready_user_data;
GRPC_CLOSURE_SCHED(&calld->pick_closure_, result.error);
if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem);
*error = result.error;
return true;
}
}

@ -25,6 +25,7 @@
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/filters/client_channel/subchannel_interface.h"
#include "src/core/lib/gprpp/abstract.h"
#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/string_view.h"
@ -77,6 +78,26 @@ extern DebugOnlyTraceFlag grpc_trace_lb_policy_refcount;
// interested_parties() hooks from the API.
class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
public:
// Represents backend metrics reported by the backend to the client.
struct BackendMetricData {
/// CPU utilization expressed as a fraction of available CPU resources.
double cpu_utilization;
/// Memory utilization expressed as a fraction of available memory
/// resources.
double mem_utilization;
/// Total requests per second being served by the backend. This
/// should include all services that a backend is responsible for.
uint64_t requests_per_second;
/// Application-specific requests cost metrics. Metric names are
/// determined by the application. Each value is an absolute cost
/// (e.g. 3487 bytes of storage) associated with the request.
Map<StringView, double, StringLess> request_cost;
/// Application-specific resource utilization metrics. Metric names
/// are determined by the application. Each value is expressed as a
/// fraction of total resources available.
Map<StringView, double, StringLess> utilization;
};
/// Interface for accessing per-call state.
/// Implemented by the client channel and used by the SubchannelPicker.
class CallState {
@ -90,6 +111,10 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
/// for allocations that need to be made on a per-call basis.
virtual void* Alloc(size_t size) GRPC_ABSTRACT;
/// Returns the backend metric data returned by the server for the call,
/// or null if no backend metric data was returned.
virtual const BackendMetricData* GetBackendMetricData() GRPC_ABSTRACT;
GRPC_ABSTRACT_BASE_CLASS
};
@ -175,6 +200,7 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
/// modified by the callback. The callback does not take ownership,
/// however, so any data that needs to be used after returning must
/// be copied.
/// call_state can be used to obtain backend metric data.
// TODO(roth): Replace grpc_error with something better before we allow
// people outside of gRPC team to use this API.
void (*recv_trailing_metadata_ready)(

@ -266,7 +266,7 @@ static void tcp_server_shutdown_complete(void* arg, grpc_error* error) {
// may do a synchronous unref.
grpc_core::ExecCtx::Get()->Flush();
if (destroy_done != nullptr) {
destroy_done->cb(destroy_done->cb_arg, GRPC_ERROR_REF(error));
GRPC_CLOSURE_SCHED(destroy_done, GRPC_ERROR_REF(error));
grpc_core::ExecCtx::Get()->Flush();
}
grpc_channel_args_destroy(state->args);

@ -655,12 +655,7 @@ static grpc_error* on_hdr(grpc_chttp2_hpack_parser* p, grpc_mdelem md) {
grpc_error* err = grpc_chttp2_hptbl_add(&p->table, md);
if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) return err;
}
if (GPR_UNLIKELY(p->on_header == nullptr)) {
GRPC_MDELEM_UNREF(md);
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("on_header callback not set");
}
p->on_header(p->on_header_user_data, md);
return GRPC_ERROR_NONE;
return p->on_header(p->on_header_user_data, md);
}
static grpc_core::UnmanagedMemorySlice take_string_extern(
@ -765,23 +760,26 @@ static grpc_error* parse_stream_dep0(grpc_chttp2_hpack_parser* p,
return parse_stream_dep1(p, cur + 1, end);
}
static grpc_error* GPR_ATTRIBUTE_NOINLINE
on_invalid_hpack_idx(grpc_chttp2_hpack_parser* p) {
return grpc_error_set_int(
grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid HPACK index received"),
GRPC_ERROR_INT_INDEX, static_cast<intptr_t>(p->index)),
GRPC_ERROR_INT_SIZE, static_cast<intptr_t>(p->table.num_ents));
}
/* emit an indexed field; jumps to begin the next field on completion */
static grpc_error* finish_indexed_field(grpc_chttp2_hpack_parser* p,
const uint8_t* cur,
const uint8_t* end) {
grpc_mdelem md = grpc_chttp2_hptbl_lookup(&p->table, p->index);
if (GRPC_MDISNULL(md)) {
return grpc_error_set_int(
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Invalid HPACK index received"),
GRPC_ERROR_INT_INDEX,
static_cast<intptr_t>(p->index)),
GRPC_ERROR_INT_SIZE, static_cast<intptr_t>(p->table.num_ents));
grpc_mdelem md = grpc_chttp2_hptbl_lookup<true>(&p->table, p->index);
if (GPR_UNLIKELY(GRPC_MDISNULL(md))) {
return on_invalid_hpack_idx(p);
}
GRPC_MDELEM_REF(md);
GRPC_STATS_INC_HPACK_RECV_INDEXED();
grpc_error* err = on_hdr<false>(p, md);
if (err != GRPC_ERROR_NONE) return err;
if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) return err;
return parse_begin(p, cur, end);
}
@ -1557,13 +1555,8 @@ static void set_precomputed_md_idx(grpc_chttp2_hpack_parser* p,
static grpc_error* is_binary_indexed_header(grpc_chttp2_hpack_parser* p,
bool* is) {
grpc_mdelem elem = grpc_chttp2_hptbl_lookup(&p->table, p->index);
if (GRPC_MDISNULL(elem)) {
return grpc_error_set_int(
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Invalid HPACK index received"),
GRPC_ERROR_INT_INDEX,
static_cast<intptr_t>(p->index)),
GRPC_ERROR_INT_SIZE, static_cast<intptr_t>(p->table.num_ents));
if (GPR_UNLIKELY(GRPC_MDISNULL(elem))) {
return on_invalid_hpack_idx(p);
}
/* We know that GRPC_MDKEY(elem) points to a reference counted slice since:
* 1. elem was a result of grpc_chttp2_hptbl_lookup
@ -1599,10 +1592,16 @@ static grpc_error* parse_value_string_with_literal_key(
return parse_value_string(p, cur, end, is_binary_literal_header(p));
}
/* "Uninitialized" header parser to save us a branch in on_hdr(). */
static grpc_error* on_header_uninitialized(void* user_data, grpc_mdelem md) {
GRPC_MDELEM_UNREF(md);
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("on_header callback not set");
}
/* PUBLIC INTERFACE */
void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser* p) {
p->on_header = nullptr;
p->on_header = on_header_uninitialized;
p->on_header_user_data = nullptr;
p->state = parse_begin;
p->key.data.referenced = grpc_empty_slice();
@ -1750,7 +1749,7 @@ grpc_error* grpc_chttp2_header_parser_parse(void* hpack_parser,
grpc_chttp2_mark_stream_closed(t, s, true, false, GRPC_ERROR_NONE);
}
}
parser->on_header = nullptr;
parser->on_header = on_header_uninitialized;
parser->on_header_user_data = nullptr;
parser->is_boundary = 0xde;
parser->is_eof = 0xde;

@ -46,7 +46,7 @@ typedef struct {
struct grpc_chttp2_hpack_parser {
/* user specified callback for each header output */
void (*on_header)(void* user_data, grpc_mdelem md);
grpc_error* (*on_header)(void* user_data, grpc_mdelem md);
void* on_header_user_data;
grpc_error* last_error;

@ -44,19 +44,34 @@ void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl* tbl) {
tbl->ents = nullptr;
}
grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl,
uint32_t tbl_index) {
template <bool take_ref>
static grpc_mdelem lookup_dynamic_index(const grpc_chttp2_hptbl* tbl,
uint32_t tbl_index) {
/* Not static - find the value in the list of valid entries */
tbl_index -= (GRPC_CHTTP2_LAST_STATIC_ENTRY + 1);
if (tbl_index < tbl->num_ents) {
uint32_t offset =
(tbl->num_ents - 1u - tbl_index + tbl->first_ent) % tbl->cap_entries;
return tbl->ents[offset];
grpc_mdelem md = tbl->ents[offset];
if (take_ref) {
GRPC_MDELEM_REF(md);
}
return md;
}
/* Invalid entry: return error */
return GRPC_MDNULL;
}
grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl,
uint32_t tbl_index) {
return lookup_dynamic_index<false>(tbl, tbl_index);
}
grpc_mdelem grpc_chttp2_hptbl_lookup_ref_dynamic_index(
const grpc_chttp2_hptbl* tbl, uint32_t tbl_index) {
return lookup_dynamic_index<true>(tbl, tbl_index);
}
/* Evict one element from the table */
static void evict1(grpc_chttp2_hptbl* tbl) {
grpc_mdelem first_ent = tbl->ents[tbl->first_ent];

@ -95,6 +95,9 @@ grpc_error* grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl* tbl,
/* lookup a table entry based on its hpack index */
grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl,
uint32_t tbl_index);
grpc_mdelem grpc_chttp2_hptbl_lookup_ref_dynamic_index(
const grpc_chttp2_hptbl* tbl, uint32_t tbl_index);
template <bool take_ref = false>
inline grpc_mdelem grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl* tbl,
uint32_t index) {
/* Static table comes first, just return an entry from it.
@ -103,9 +106,15 @@ inline grpc_mdelem grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl* tbl,
must follow the hpack standard. If that changes, we *must* not rely on
reading the core static metadata table here; at that point we'd need our
own singleton static metadata in the correct order. */
return index <= GRPC_CHTTP2_LAST_STATIC_ENTRY
? grpc_static_mdelem_manifested()[index - 1]
: grpc_chttp2_hptbl_lookup_dynamic_index(tbl, index);
if (index <= GRPC_CHTTP2_LAST_STATIC_ENTRY) {
return grpc_static_mdelem_manifested()[index - 1];
} else {
if (take_ref) {
return grpc_chttp2_hptbl_lookup_ref_dynamic_index(tbl, index);
} else {
return grpc_chttp2_hptbl_lookup_dynamic_index(tbl, index);
}
}
}
/* add a table entry to the index */
grpc_error* grpc_chttp2_hptbl_add(grpc_chttp2_hptbl* tbl,

@ -318,7 +318,10 @@ static grpc_error* skip_parser(void* parser, grpc_chttp2_transport* t,
return GRPC_ERROR_NONE;
}
static void skip_header(void* tp, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); }
static grpc_error* skip_header(void* tp, grpc_mdelem md) {
GRPC_MDELEM_UNREF(md);
return GRPC_ERROR_NONE;
}
static grpc_error* init_skip_frame_parser(grpc_chttp2_transport* t,
int is_header) {
@ -419,7 +422,7 @@ static bool is_nonzero_status(grpc_mdelem md) {
!md_cmp(md, GRPC_MDELEM_GRPC_STATUS_0, GRPC_MDSTR_GRPC_STATUS);
}
static void on_initial_header(void* tp, grpc_mdelem md) {
static grpc_error* on_initial_header(void* tp, grpc_mdelem md) {
GPR_TIMER_SCOPE("on_initial_header", 0);
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
@ -465,7 +468,7 @@ static void on_initial_header(void* tp, grpc_mdelem md) {
&s->metadata_buffer[0], grpc_core::ExecCtx::Get()->Now() + timeout);
}
GRPC_MDELEM_UNREF(md);
return;
return GRPC_ERROR_NONE;
}
const size_t new_size = s->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md);
@ -496,9 +499,10 @@ static void on_initial_header(void* tp, grpc_mdelem md) {
GRPC_MDELEM_UNREF(md);
}
}
return GRPC_ERROR_NONE;
}
static void on_trailing_header(void* tp, grpc_mdelem md) {
static grpc_error* on_trailing_header(void* tp, grpc_mdelem md) {
GPR_TIMER_SCOPE("on_trailing_header", 0);
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp);
@ -547,6 +551,7 @@ static void on_trailing_header(void* tp, grpc_mdelem md) {
GRPC_MDELEM_UNREF(md);
}
}
return GRPC_ERROR_NONE;
}
static grpc_error* init_header_frame_parser(grpc_chttp2_transport* t,

@ -11,6 +11,8 @@
#include "envoy/api/v2/auth/cert.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/api/v2/core/config_source.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "gogoproto/gogo.upb.h"
@ -30,22 +32,41 @@ const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit = {
UPB_SIZE(24, 32), 4, false,
};
static const upb_msglayout *const envoy_api_v2_auth_TlsCertificate_submsgs[5] = {
static const upb_msglayout *const envoy_api_v2_auth_PrivateKeyProvider_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_auth_PrivateKeyProvider__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit = {
&envoy_api_v2_auth_PrivateKeyProvider_submsgs[0],
&envoy_api_v2_auth_PrivateKeyProvider__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_auth_TlsCertificate_submsgs[6] = {
&envoy_api_v2_auth_PrivateKeyProvider_msginit,
&envoy_api_v2_core_DataSource_msginit,
};
static const upb_msglayout_field envoy_api_v2_auth_TlsCertificate__fields[5] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
{3, UPB_SIZE(8, 16), 0, 0, 11, 1},
{4, UPB_SIZE(12, 24), 0, 0, 11, 1},
{5, UPB_SIZE(16, 32), 0, 0, 11, 3},
static const upb_msglayout_field envoy_api_v2_auth_TlsCertificate__fields[6] = {
{1, UPB_SIZE(0, 0), 0, 1, 11, 1},
{2, UPB_SIZE(4, 8), 0, 1, 11, 1},
{3, UPB_SIZE(8, 16), 0, 1, 11, 1},
{4, UPB_SIZE(12, 24), 0, 1, 11, 1},
{5, UPB_SIZE(20, 40), 0, 1, 11, 3},
{6, UPB_SIZE(16, 32), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_auth_TlsCertificate_msginit = {
&envoy_api_v2_auth_TlsCertificate_submsgs[0],
&envoy_api_v2_auth_TlsCertificate__fields[0],
UPB_SIZE(20, 40), 5, false,
UPB_SIZE(24, 48), 6, false,
};
static const upb_msglayout *const envoy_api_v2_auth_TlsSessionTicketKeys_submsgs[1] = {

@ -21,6 +21,7 @@ extern "C" {
#endif
struct envoy_api_v2_auth_TlsParameters;
struct envoy_api_v2_auth_PrivateKeyProvider;
struct envoy_api_v2_auth_TlsCertificate;
struct envoy_api_v2_auth_TlsSessionTicketKeys;
struct envoy_api_v2_auth_CertificateValidationContext;
@ -31,6 +32,7 @@ struct envoy_api_v2_auth_DownstreamTlsContext;
struct envoy_api_v2_auth_SdsSecretConfig;
struct envoy_api_v2_auth_Secret;
typedef struct envoy_api_v2_auth_TlsParameters envoy_api_v2_auth_TlsParameters;
typedef struct envoy_api_v2_auth_PrivateKeyProvider envoy_api_v2_auth_PrivateKeyProvider;
typedef struct envoy_api_v2_auth_TlsCertificate envoy_api_v2_auth_TlsCertificate;
typedef struct envoy_api_v2_auth_TlsSessionTicketKeys envoy_api_v2_auth_TlsSessionTicketKeys;
typedef struct envoy_api_v2_auth_CertificateValidationContext envoy_api_v2_auth_CertificateValidationContext;
@ -41,6 +43,7 @@ typedef struct envoy_api_v2_auth_DownstreamTlsContext envoy_api_v2_auth_Downstre
typedef struct envoy_api_v2_auth_SdsSecretConfig envoy_api_v2_auth_SdsSecretConfig;
typedef struct envoy_api_v2_auth_Secret envoy_api_v2_auth_Secret;
extern const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit;
extern const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit;
extern const upb_msglayout envoy_api_v2_auth_TlsCertificate_msginit;
extern const upb_msglayout envoy_api_v2_auth_TlsSessionTicketKeys_msginit;
extern const upb_msglayout envoy_api_v2_auth_CertificateValidationContext_msginit;
@ -52,11 +55,15 @@ extern const upb_msglayout envoy_api_v2_auth_SdsSecretConfig_msginit;
extern const upb_msglayout envoy_api_v2_auth_Secret_msginit;
struct envoy_api_v2_core_ConfigSource;
struct envoy_api_v2_core_DataSource;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
struct google_protobuf_Struct;
struct google_protobuf_UInt32Value;
extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit;
extern const upb_msglayout envoy_api_v2_core_DataSource_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
typedef enum {
@ -114,6 +121,61 @@ UPB_INLINE bool envoy_api_v2_auth_TlsParameters_add_ecdh_curves(envoy_api_v2_aut
msg, UPB_SIZE(20, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
/* envoy.api.v2.auth.PrivateKeyProvider */
UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_new(upb_arena *arena) {
return (envoy_api_v2_auth_PrivateKeyProvider *)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena);
}
UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_auth_PrivateKeyProvider *ret = envoy_api_v2_auth_PrivateKeyProvider_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_auth_PrivateKeyProvider_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_auth_PrivateKeyProvider_serialize(const envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_auth_PrivateKeyProvider_msginit, arena, len);
}
typedef enum {
envoy_api_v2_auth_PrivateKeyProvider_config_type_config = 2,
envoy_api_v2_auth_PrivateKeyProvider_config_type_typed_config = 3,
envoy_api_v2_auth_PrivateKeyProvider_config_type_NOT_SET = 0
} envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases;
UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases envoy_api_v2_auth_PrivateKeyProvider_config_type_case(const envoy_api_v2_auth_PrivateKeyProvider* msg) { return (envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview envoy_api_v2_auth_PrivateKeyProvider_provider_name(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); }
UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_provider_name(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_config(envoy_api_v2_auth_PrivateKeyProvider *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_mutable_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_auth_PrivateKeyProvider_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_auth_PrivateKeyProvider_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(envoy_api_v2_auth_PrivateKeyProvider *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_mutable_typed_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_auth_PrivateKeyProvider_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(msg, sub);
}
return sub;
}
/* envoy.api.v2.auth.TlsCertificate */
UPB_INLINE envoy_api_v2_auth_TlsCertificate *envoy_api_v2_auth_TlsCertificate_new(upb_arena *arena) {
@ -132,7 +194,8 @@ UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCerti
UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_private_key(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)); }
UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_password(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)); }
UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_ocsp_staple(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 24)); }
UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsCertificate_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsCertificate_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
UPB_INLINE const envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_private_key_provider(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)); }
UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_certificate_chain(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)) = value;
@ -183,18 +246,30 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate
return sub;
}
UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificate_mutable_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, size_t *len) {
return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificate_resize_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_add_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) {
struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, envoy_api_v2_auth_PrivateKeyProvider* value) {
UPB_FIELD_AT(msg, envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)) = value;
}
UPB_INLINE struct envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_mutable_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) {
struct envoy_api_v2_auth_PrivateKeyProvider* sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)envoy_api_v2_auth_TlsCertificate_private_key_provider(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_auth_TlsCertificate_set_private_key_provider(msg, sub);
}
return sub;
}
/* envoy.api.v2.auth.TlsSessionTicketKeys */

@ -17,6 +17,7 @@
#include "envoy/api/v2/core/health_check.upb.h"
#include "envoy/api/v2/core/protocol.upb.h"
#include "envoy/api/v2/cluster/circuit_breaker.upb.h"
#include "envoy/api/v2/cluster/filter.upb.h"
#include "envoy/api/v2/cluster/outlier_detection.upb.h"
#include "envoy/api/v2/eds.upb.h"
#include "envoy/type/percent.upb.h"
@ -30,7 +31,7 @@
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = {
static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[29] = {
&envoy_api_v2_Cluster_CommonLbConfig_msginit,
&envoy_api_v2_Cluster_CustomClusterType_msginit,
&envoy_api_v2_Cluster_EdsClusterConfig_msginit,
@ -44,6 +45,7 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = {
&envoy_api_v2_UpstreamConnectionOptions_msginit,
&envoy_api_v2_auth_UpstreamTlsContext_msginit,
&envoy_api_v2_cluster_CircuitBreakers_msginit,
&envoy_api_v2_cluster_Filter_msginit,
&envoy_api_v2_cluster_OutlierDetection_msginit,
&envoy_api_v2_core_Address_msginit,
&envoy_api_v2_core_BindConfig_msginit,
@ -57,49 +59,51 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = {
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_Cluster__fields[36] = {
static const upb_msglayout_field envoy_api_v2_Cluster__fields[38] = {
{1, UPB_SIZE(28, 32), 0, 0, 9, 1},
{2, UPB_SIZE(144, 256), UPB_SIZE(-153, -265), 0, 14, 1},
{2, UPB_SIZE(144, 264), UPB_SIZE(-153, -273), 0, 14, 1},
{3, UPB_SIZE(44, 64), 0, 2, 11, 1},
{4, UPB_SIZE(48, 72), 0, 22, 11, 1},
{5, UPB_SIZE(52, 80), 0, 23, 11, 1},
{4, UPB_SIZE(48, 72), 0, 23, 11, 1},
{5, UPB_SIZE(52, 80), 0, 24, 11, 1},
{6, UPB_SIZE(0, 0), 0, 0, 14, 1},
{7, UPB_SIZE(120, 216), 0, 14, 11, 3},
{8, UPB_SIZE(124, 224), 0, 16, 11, 3},
{9, UPB_SIZE(56, 88), 0, 23, 11, 1},
{7, UPB_SIZE(120, 216), 0, 15, 11, 3},
{8, UPB_SIZE(124, 224), 0, 17, 11, 3},
{9, UPB_SIZE(56, 88), 0, 24, 11, 1},
{10, UPB_SIZE(60, 96), 0, 12, 11, 1},
{11, UPB_SIZE(64, 104), 0, 11, 11, 1},
{13, UPB_SIZE(68, 112), 0, 17, 11, 1},
{14, UPB_SIZE(72, 120), 0, 18, 11, 1},
{16, UPB_SIZE(76, 128), 0, 22, 11, 1},
{13, UPB_SIZE(68, 112), 0, 18, 11, 1},
{14, UPB_SIZE(72, 120), 0, 19, 11, 1},
{16, UPB_SIZE(76, 128), 0, 23, 11, 1},
{17, UPB_SIZE(8, 8), 0, 0, 14, 1},
{18, UPB_SIZE(128, 232), 0, 14, 11, 3},
{19, UPB_SIZE(80, 136), 0, 13, 11, 1},
{20, UPB_SIZE(84, 144), 0, 22, 11, 1},
{21, UPB_SIZE(88, 152), 0, 15, 11, 1},
{18, UPB_SIZE(128, 232), 0, 15, 11, 3},
{19, UPB_SIZE(80, 136), 0, 14, 11, 1},
{20, UPB_SIZE(84, 144), 0, 23, 11, 1},
{21, UPB_SIZE(88, 152), 0, 16, 11, 1},
{22, UPB_SIZE(92, 160), 0, 4, 11, 1},
{23, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 7, 11, 1},
{24, UPB_SIZE(96, 168), 0, 21, 11, 1},
{25, UPB_SIZE(100, 176), 0, 20, 11, 1},
{23, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 7, 11, 1},
{24, UPB_SIZE(96, 168), 0, 22, 11, 1},
{25, UPB_SIZE(100, 176), 0, 21, 11, 1},
{26, UPB_SIZE(16, 16), 0, 0, 14, 1},
{27, UPB_SIZE(104, 184), 0, 0, 11, 1},
{28, UPB_SIZE(36, 48), 0, 0, 9, 1},
{29, UPB_SIZE(108, 192), 0, 19, 11, 1},
{29, UPB_SIZE(108, 192), 0, 20, 11, 1},
{30, UPB_SIZE(112, 200), 0, 10, 11, 1},
{31, UPB_SIZE(24, 24), 0, 0, 8, 1},
{32, UPB_SIZE(25, 25), 0, 0, 8, 1},
{33, UPB_SIZE(116, 208), 0, 9, 11, 1},
{34, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 6, 11, 1},
{34, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 6, 11, 1},
{35, UPB_SIZE(132, 240), 0, 3, 11, 3},
{36, UPB_SIZE(136, 248), 0, 8, 11, 3},
{37, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 5, 11, 1},
{38, UPB_SIZE(144, 256), UPB_SIZE(-153, -265), 1, 11, 1},
{37, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 5, 11, 1},
{38, UPB_SIZE(144, 264), UPB_SIZE(-153, -273), 1, 11, 1},
{39, UPB_SIZE(26, 26), 0, 0, 8, 1},
{40, UPB_SIZE(140, 256), 0, 13, 11, 3},
};
const upb_msglayout envoy_api_v2_Cluster_msginit = {
&envoy_api_v2_Cluster_submsgs[0],
&envoy_api_v2_Cluster__fields[0],
UPB_SIZE(168, 288), 36, false,
UPB_SIZE(168, 304), 38, false,
};
static const upb_msglayout *const envoy_api_v2_Cluster_CustomClusterType_submsgs[1] = {
@ -167,29 +171,31 @@ static const upb_msglayout *const envoy_api_v2_Cluster_LbSubsetConfig_submsgs[2]
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[6] = {
static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[7] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
{2, UPB_SIZE(12, 16), 0, 1, 11, 1},
{3, UPB_SIZE(16, 24), 0, 0, 11, 3},
{4, UPB_SIZE(8, 8), 0, 0, 8, 1},
{5, UPB_SIZE(9, 9), 0, 0, 8, 1},
{6, UPB_SIZE(10, 10), 0, 0, 8, 1},
{7, UPB_SIZE(11, 11), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_msginit = {
&envoy_api_v2_Cluster_LbSubsetConfig_submsgs[0],
&envoy_api_v2_Cluster_LbSubsetConfig__fields[0],
UPB_SIZE(24, 32), 6, false,
UPB_SIZE(24, 32), 7, false,
};
static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 3},
static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[2] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 3},
{2, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit = {
NULL,
&envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[0],
UPB_SIZE(4, 8), 1, false,
UPB_SIZE(16, 16), 2, false,
};
static const upb_msglayout *const envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[1] = {
@ -239,18 +245,19 @@ static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[4]
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[5] = {
static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[6] = {
{1, UPB_SIZE(4, 8), 0, 2, 11, 1},
{2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
{3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1},
{4, UPB_SIZE(8, 16), 0, 3, 11, 1},
{5, UPB_SIZE(0, 0), 0, 0, 8, 1},
{6, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_msginit = {
&envoy_api_v2_Cluster_CommonLbConfig_submsgs[0],
&envoy_api_v2_Cluster_CommonLbConfig__fields[0],
UPB_SIZE(20, 40), 5, false,
UPB_SIZE(20, 40), 6, false,
};
static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[2] = {

@ -68,6 +68,7 @@ extern const upb_msglayout envoy_api_v2_UpstreamConnectionOptions_msginit;
struct envoy_api_v2_ClusterLoadAssignment;
struct envoy_api_v2_auth_UpstreamTlsContext;
struct envoy_api_v2_cluster_CircuitBreakers;
struct envoy_api_v2_cluster_Filter;
struct envoy_api_v2_cluster_OutlierDetection;
struct envoy_api_v2_core_Address;
struct envoy_api_v2_core_BindConfig;
@ -88,6 +89,7 @@ struct google_protobuf_UInt64Value;
extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit;
extern const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit;
extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit;
extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit;
extern const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit;
extern const upb_msglayout envoy_api_v2_core_Address_msginit;
extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit;
@ -141,6 +143,13 @@ typedef enum {
envoy_api_v2_Cluster_LbSubsetConfig_DEFAULT_SUBSET = 2
} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy;
typedef enum {
envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED = 0,
envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK = 1,
envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT = 2,
envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET = 3
} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy;
typedef enum {
envoy_api_v2_Cluster_RingHashLbConfig_XX_HASH = 0,
envoy_api_v2_Cluster_RingHashLbConfig_MURMUR_HASH_2 = 1
@ -166,7 +175,7 @@ typedef enum {
envoy_api_v2_Cluster_cluster_discovery_type_cluster_type = 38,
envoy_api_v2_Cluster_cluster_discovery_type_NOT_SET = 0
} envoy_api_v2_Cluster_cluster_discovery_type_oneofcases;
UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(152, 264)); }
UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(152, 272)); }
typedef enum {
envoy_api_v2_Cluster_lb_config_ring_hash_lb_config = 23,
@ -174,11 +183,11 @@ typedef enum {
envoy_api_v2_Cluster_lb_config_least_request_lb_config = 37,
envoy_api_v2_Cluster_lb_config_NOT_SET = 0
} envoy_api_v2_Cluster_lb_config_oneofcases;
UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(160, 280)); }
UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(160, 288)); }
UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); }
UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 264), 2); }
UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(144, 256), UPB_SIZE(152, 264), 2, envoy_api_v2_Cluster_STATIC); }
UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 272), 2); }
UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(144, 264), UPB_SIZE(152, 272), 2, envoy_api_v2_Cluster_STATIC); }
UPB_INLINE const envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(44, 64)); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_connect_timeout(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(48, 72)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(52, 80)); }
@ -197,8 +206,8 @@ UPB_INLINE const struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Clus
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_cleanup_interval(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(84, 144)); }
UPB_INLINE const struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_BindConfig*, UPB_SIZE(88, 152)); }
UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_lb_subset_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_LbSubsetConfig*, UPB_SIZE(92, 160)); }
UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 23); }
UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 23, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 23); }
UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 23, NULL); }
UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_transport_socket(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(96, 168)); }
UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_metadata(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(100, 176)); }
UPB_INLINE int32_t envoy_api_v2_Cluster_protocol_selection(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); }
@ -209,20 +218,22 @@ UPB_INLINE const envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_up
UPB_INLINE bool envoy_api_v2_Cluster_close_connections_on_host_health_failure(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); }
UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); }
UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_ClusterLoadAssignment*, UPB_SIZE(116, 208)); }
UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 34); }
UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 34, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 34); }
UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 34, NULL); }
UPB_INLINE const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(132, 240), len); }
UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_typed_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(136, 248), len); }
UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 37); }
UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 37, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 264), 38); }
UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 256), UPB_SIZE(152, 264), 38, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 37); }
UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 37, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 272), 38); }
UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 264), UPB_SIZE(152, 272), 38, NULL); }
UPB_INLINE bool envoy_api_v2_Cluster_respect_dns_ttl(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); }
UPB_INLINE const struct envoy_api_v2_cluster_Filter* const* envoy_api_v2_Cluster_filters(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_cluster_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(140, 256), len); }
UPB_INLINE void envoy_api_v2_Cluster_set_name(envoy_api_v2_Cluster *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value;
}
UPB_INLINE void envoy_api_v2_Cluster_set_type(envoy_api_v2_Cluster *msg, int32_t value) {
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(144, 256), value, UPB_SIZE(152, 264), 2);
UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(144, 264), value, UPB_SIZE(152, 272), 2);
}
UPB_INLINE void envoy_api_v2_Cluster_set_eds_cluster_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_EdsClusterConfig* value) {
UPB_FIELD_AT(msg, envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(44, 64)) = value;
@ -426,7 +437,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_muta
return sub;
}
UPB_INLINE void envoy_api_v2_Cluster_set_ring_hash_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_RingHashLbConfig* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 23);
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 23);
}
UPB_INLINE struct envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_mutable_ring_hash_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) {
struct envoy_api_v2_Cluster_RingHashLbConfig* sub = (struct envoy_api_v2_Cluster_RingHashLbConfig*)envoy_api_v2_Cluster_ring_hash_lb_config(msg);
@ -522,7 +533,7 @@ UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_mutab
return sub;
}
UPB_INLINE void envoy_api_v2_Cluster_set_original_dst_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_OriginalDstLbConfig* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 34);
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 34);
}
UPB_INLINE struct envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_mutable_original_dst_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) {
struct envoy_api_v2_Cluster_OriginalDstLbConfig* sub = (struct envoy_api_v2_Cluster_OriginalDstLbConfig*)envoy_api_v2_Cluster_original_dst_lb_config(msg);
@ -560,7 +571,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy
return sub;
}
UPB_INLINE void envoy_api_v2_Cluster_set_least_request_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_LeastRequestLbConfig* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 37);
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 37);
}
UPB_INLINE struct envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_mutable_least_request_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) {
struct envoy_api_v2_Cluster_LeastRequestLbConfig* sub = (struct envoy_api_v2_Cluster_LeastRequestLbConfig*)envoy_api_v2_Cluster_least_request_lb_config(msg);
@ -572,7 +583,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluste
return sub;
}
UPB_INLINE void envoy_api_v2_Cluster_set_cluster_type(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_CustomClusterType* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 256), value, UPB_SIZE(152, 264), 38);
UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 264), value, UPB_SIZE(152, 272), 38);
}
UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_mutable_cluster_type(envoy_api_v2_Cluster *msg, upb_arena *arena) {
struct envoy_api_v2_Cluster_CustomClusterType* sub = (struct envoy_api_v2_Cluster_CustomClusterType*)envoy_api_v2_Cluster_cluster_type(msg);
@ -583,6 +594,22 @@ UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_m
}
return sub;
}
UPB_INLINE void envoy_api_v2_Cluster_set_respect_dns_ttl(envoy_api_v2_Cluster *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value;
}
UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_mutable_filters(envoy_api_v2_Cluster *msg, size_t *len) {
return (struct envoy_api_v2_cluster_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 256), len);
}
UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_resize_filters(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_cluster_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(140, 256), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_cluster_Filter* envoy_api_v2_Cluster_add_filters(envoy_api_v2_Cluster *msg, upb_arena *arena) {
struct envoy_api_v2_cluster_Filter* sub = (struct envoy_api_v2_cluster_Filter*)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(140, 256), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
/* envoy.api.v2.Cluster.CustomClusterType */
@ -736,6 +763,7 @@ UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* const* en
UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_locality_weight_aware(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); }
UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_scale_locality_weight(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)); }
UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_panic_mode_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)); }
UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_list_as_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)); }
UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
@ -774,6 +802,9 @@ UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_scale_locality_weight(en
UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_panic_mode_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)) = value;
}
UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_list_as_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)) = value;
}
/* envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector */
@ -789,17 +820,21 @@ UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_serialize(
return upb_encode(msg, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, len);
}
UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_resize_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_add_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
msg, UPB_SIZE(8, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
/* envoy.api.v2.Cluster.LeastRequestLbConfig */
@ -925,6 +960,7 @@ UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_locality_weighted_lb_con
UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_api_v2_Cluster_CommonLbConfig_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(envoy_api_v2_Cluster_CommonLbConfig *msg, struct envoy_type_Percent* value) {
UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(4, 8)) = value;
@ -977,6 +1013,9 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_
UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_ignore_new_hosts_until_first_hc(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_close_connections_on_host_set_change(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
}
/* envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig */

@ -0,0 +1,34 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/cluster/filter.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/cluster/filter.upb.h"
#include "google/protobuf/any.upb.h"
#include "validate/validate.upb.h"
#include "gogoproto/gogo.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_cluster_Filter_submsgs[1] = {
&google_protobuf_Any_msginit,
};
static const upb_msglayout_field envoy_api_v2_cluster_Filter__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_cluster_Filter_msginit = {
&envoy_api_v2_cluster_Filter_submsgs[0],
&envoy_api_v2_cluster_Filter__fields[0],
UPB_SIZE(16, 32), 2, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,69 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/cluster/filter.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_
#define ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_cluster_Filter;
typedef struct envoy_api_v2_cluster_Filter envoy_api_v2_cluster_Filter;
extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit;
struct google_protobuf_Any;
extern const upb_msglayout google_protobuf_Any_msginit;
/* envoy.api.v2.cluster.Filter */
UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_new(upb_arena *arena) {
return (envoy_api_v2_cluster_Filter *)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena);
}
UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_cluster_Filter *ret = envoy_api_v2_cluster_Filter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_cluster_Filter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_cluster_Filter_serialize(const envoy_api_v2_cluster_Filter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_cluster_Filter_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_api_v2_cluster_Filter_name(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_cluster_Filter_typed_config(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); }
UPB_INLINE void envoy_api_v2_cluster_Filter_set_name(envoy_api_v2_cluster_Filter *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_cluster_Filter_set_typed_config(envoy_api_v2_cluster_Filter *msg, struct google_protobuf_Any* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_api_v2_cluster_Filter_mutable_typed_config(envoy_api_v2_cluster_Filter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_cluster_Filter_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_cluster_Filter_set_typed_config(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ */

@ -16,29 +16,33 @@
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_cluster_OutlierDetection_submsgs[11] = {
static const upb_msglayout *const envoy_api_v2_cluster_OutlierDetection_submsgs[14] = {
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_cluster_OutlierDetection__fields[11] = {
{1, UPB_SIZE(0, 0), 0, 1, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
{3, UPB_SIZE(8, 16), 0, 0, 11, 1},
{4, UPB_SIZE(12, 24), 0, 1, 11, 1},
{5, UPB_SIZE(16, 32), 0, 1, 11, 1},
{6, UPB_SIZE(20, 40), 0, 1, 11, 1},
{7, UPB_SIZE(24, 48), 0, 1, 11, 1},
{8, UPB_SIZE(28, 56), 0, 1, 11, 1},
{9, UPB_SIZE(32, 64), 0, 1, 11, 1},
{10, UPB_SIZE(36, 72), 0, 1, 11, 1},
{11, UPB_SIZE(40, 80), 0, 1, 11, 1},
static const upb_msglayout_field envoy_api_v2_cluster_OutlierDetection__fields[15] = {
{1, UPB_SIZE(4, 8), 0, 1, 11, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
{3, UPB_SIZE(12, 24), 0, 0, 11, 1},
{4, UPB_SIZE(16, 32), 0, 1, 11, 1},
{5, UPB_SIZE(20, 40), 0, 1, 11, 1},
{6, UPB_SIZE(24, 48), 0, 1, 11, 1},
{7, UPB_SIZE(28, 56), 0, 1, 11, 1},
{8, UPB_SIZE(32, 64), 0, 1, 11, 1},
{9, UPB_SIZE(36, 72), 0, 1, 11, 1},
{10, UPB_SIZE(40, 80), 0, 1, 11, 1},
{11, UPB_SIZE(44, 88), 0, 1, 11, 1},
{12, UPB_SIZE(0, 0), 0, 0, 8, 1},
{13, UPB_SIZE(48, 96), 0, 1, 11, 1},
{14, UPB_SIZE(52, 104), 0, 1, 11, 1},
{15, UPB_SIZE(56, 112), 0, 1, 11, 1},
};
const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit = {
&envoy_api_v2_cluster_OutlierDetection_submsgs[0],
&envoy_api_v2_cluster_OutlierDetection__fields[0],
UPB_SIZE(44, 88), 11, false,
UPB_SIZE(60, 120), 15, false,
};
#include "upb/port_undef.inc"

@ -43,20 +43,24 @@ UPB_INLINE char *envoy_api_v2_cluster_OutlierDetection_serialize(const envoy_api
return upb_encode(msg, &envoy_api_v2_cluster_OutlierDetection_msginit, arena, len);
}
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)); }
UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_split_external_local_origin_errors(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)); }
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(msg);
@ -68,7 +72,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_interval(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_interval(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_interval(msg);
@ -80,7 +84,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_base_ejection_time(msg);
@ -92,7 +96,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(msg);
@ -104,7 +108,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(msg);
@ -116,7 +120,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(msg);
@ -128,7 +132,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(msg);
@ -140,7 +144,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(msg);
@ -152,7 +156,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(msg);
@ -164,7 +168,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(msg);
@ -176,7 +180,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(msg);
@ -187,6 +191,45 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec
}
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_split_external_local_origin_errors(envoy_api_v2_cluster_OutlierDetection *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */

@ -9,6 +9,7 @@
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/api/v2/core/http_uri.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
@ -142,6 +143,37 @@ const upb_msglayout envoy_api_v2_core_DataSource_msginit = {
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_core_RemoteDataSource_submsgs[1] = {
&envoy_api_v2_core_HttpUri_msginit,
};
static const upb_msglayout_field envoy_api_v2_core_RemoteDataSource__fields[2] = {
{1, UPB_SIZE(8, 16), 0, 0, 11, 1},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit = {
&envoy_api_v2_core_RemoteDataSource_submsgs[0],
&envoy_api_v2_core_RemoteDataSource__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_core_AsyncDataSource_submsgs[2] = {
&envoy_api_v2_core_DataSource_msginit,
&envoy_api_v2_core_RemoteDataSource_msginit,
};
static const upb_msglayout_field envoy_api_v2_core_AsyncDataSource__fields[2] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
};
const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit = {
&envoy_api_v2_core_AsyncDataSource_submsgs[0],
&envoy_api_v2_core_AsyncDataSource__fields[0],
UPB_SIZE(8, 16), 2, false,
};
static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,

@ -29,6 +29,8 @@ struct envoy_api_v2_core_HeaderValue;
struct envoy_api_v2_core_HeaderValueOption;
struct envoy_api_v2_core_HeaderMap;
struct envoy_api_v2_core_DataSource;
struct envoy_api_v2_core_RemoteDataSource;
struct envoy_api_v2_core_AsyncDataSource;
struct envoy_api_v2_core_TransportSocket;
struct envoy_api_v2_core_SocketOption;
struct envoy_api_v2_core_RuntimeFractionalPercent;
@ -42,6 +44,8 @@ typedef struct envoy_api_v2_core_HeaderValue envoy_api_v2_core_HeaderValue;
typedef struct envoy_api_v2_core_HeaderValueOption envoy_api_v2_core_HeaderValueOption;
typedef struct envoy_api_v2_core_HeaderMap envoy_api_v2_core_HeaderMap;
typedef struct envoy_api_v2_core_DataSource envoy_api_v2_core_DataSource;
typedef struct envoy_api_v2_core_RemoteDataSource envoy_api_v2_core_RemoteDataSource;
typedef struct envoy_api_v2_core_AsyncDataSource envoy_api_v2_core_AsyncDataSource;
typedef struct envoy_api_v2_core_TransportSocket envoy_api_v2_core_TransportSocket;
typedef struct envoy_api_v2_core_SocketOption envoy_api_v2_core_SocketOption;
typedef struct envoy_api_v2_core_RuntimeFractionalPercent envoy_api_v2_core_RuntimeFractionalPercent;
@ -55,14 +59,18 @@ extern const upb_msglayout envoy_api_v2_core_HeaderValue_msginit;
extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit;
extern const upb_msglayout envoy_api_v2_core_HeaderMap_msginit;
extern const upb_msglayout envoy_api_v2_core_DataSource_msginit;
extern const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit;
extern const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit;
extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit;
extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit;
extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit;
extern const upb_msglayout envoy_api_v2_core_ControlPlane_msginit;
struct envoy_api_v2_core_HttpUri;
struct envoy_type_FractionalPercent;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
struct google_protobuf_Struct;
extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit;
extern const upb_msglayout envoy_type_FractionalPercent_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
@ -92,6 +100,12 @@ typedef enum {
envoy_api_v2_core_SocketOption_STATE_LISTENING = 2
} envoy_api_v2_core_SocketOption_SocketState;
typedef enum {
envoy_api_v2_core_UNSPECIFIED = 0,
envoy_api_v2_core_INBOUND = 1,
envoy_api_v2_core_OUTBOUND = 2
} envoy_api_v2_core_TrafficDirection;
/* envoy.api.v2.core.Locality */
@ -397,6 +411,90 @@ UPB_INLINE void envoy_api_v2_core_DataSource_set_inline_string(envoy_api_v2_core
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3);
}
/* envoy.api.v2.core.RemoteDataSource */
UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_new(upb_arena *arena) {
return (envoy_api_v2_core_RemoteDataSource *)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena);
}
UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_core_RemoteDataSource *ret = envoy_api_v2_core_RemoteDataSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_RemoteDataSource_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_core_RemoteDataSource_serialize(const envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_core_RemoteDataSource_msginit, arena, len);
}
UPB_INLINE const struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_http_uri(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)); }
UPB_INLINE upb_strview envoy_api_v2_core_RemoteDataSource_sha256(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_http_uri(envoy_api_v2_core_RemoteDataSource *msg, struct envoy_api_v2_core_HttpUri* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_mutable_http_uri(envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena) {
struct envoy_api_v2_core_HttpUri* sub = (struct envoy_api_v2_core_HttpUri*)envoy_api_v2_core_RemoteDataSource_http_uri(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_HttpUri*)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_RemoteDataSource_set_http_uri(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_sha256(envoy_api_v2_core_RemoteDataSource *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
/* envoy.api.v2.core.AsyncDataSource */
UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_new(upb_arena *arena) {
return (envoy_api_v2_core_AsyncDataSource *)upb_msg_new(&envoy_api_v2_core_AsyncDataSource_msginit, arena);
}
UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_core_AsyncDataSource *ret = envoy_api_v2_core_AsyncDataSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_AsyncDataSource_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_core_AsyncDataSource_serialize(const envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_core_AsyncDataSource_msginit, arena, len);
}
typedef enum {
envoy_api_v2_core_AsyncDataSource_specifier_local = 1,
envoy_api_v2_core_AsyncDataSource_specifier_remote = 2,
envoy_api_v2_core_AsyncDataSource_specifier_NOT_SET = 0
} envoy_api_v2_core_AsyncDataSource_specifier_oneofcases;
UPB_INLINE envoy_api_v2_core_AsyncDataSource_specifier_oneofcases envoy_api_v2_core_AsyncDataSource_specifier_case(const envoy_api_v2_core_AsyncDataSource* msg) { return (envoy_api_v2_core_AsyncDataSource_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_local(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
UPB_INLINE const envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_local(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); }
UPB_INLINE const envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_RemoteDataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_local(envoy_api_v2_core_AsyncDataSource *msg, envoy_api_v2_core_DataSource* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
}
UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_mutable_local(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) {
struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_AsyncDataSource_local(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_AsyncDataSource_set_local(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_remote(envoy_api_v2_core_AsyncDataSource *msg, envoy_api_v2_core_RemoteDataSource* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_core_RemoteDataSource*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
}
UPB_INLINE struct envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_mutable_remote(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) {
struct envoy_api_v2_core_RemoteDataSource* sub = (struct envoy_api_v2_core_RemoteDataSource*)envoy_api_v2_core_AsyncDataSource_remote(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_RemoteDataSource*)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_AsyncDataSource_set_remote(msg, sub);
}
return sub;
}
/* envoy.api.v2.core.TransportSocket */
UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_new(upb_arena *arena) {

@ -23,19 +23,20 @@ static const upb_msglayout *const envoy_api_v2_core_ApiConfigSource_submsgs[4] =
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[6] = {
static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[7] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
{2, UPB_SIZE(20, 32), 0, 0, 9, 3},
{3, UPB_SIZE(8, 8), 0, 2, 11, 1},
{4, UPB_SIZE(24, 40), 0, 0, 11, 3},
{5, UPB_SIZE(12, 16), 0, 2, 11, 1},
{6, UPB_SIZE(16, 24), 0, 1, 11, 1},
{2, UPB_SIZE(24, 40), 0, 0, 9, 3},
{3, UPB_SIZE(12, 16), 0, 2, 11, 1},
{4, UPB_SIZE(28, 48), 0, 0, 11, 3},
{5, UPB_SIZE(16, 24), 0, 2, 11, 1},
{6, UPB_SIZE(20, 32), 0, 1, 11, 1},
{7, UPB_SIZE(8, 8), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_core_ApiConfigSource_msginit = {
&envoy_api_v2_core_ApiConfigSource_submsgs[0],
&envoy_api_v2_core_ApiConfigSource__fields[0],
UPB_SIZE(32, 48), 6, false,
UPB_SIZE(32, 56), 7, false,
};
const upb_msglayout envoy_api_v2_core_AggregatedConfigSource_msginit = {

@ -64,27 +64,28 @@ UPB_INLINE char *envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_
}
UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 8)); }
UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 16)); }
UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(16, 24)); }
UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 16)); }
UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 24)); }
UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(20, 32)); }
UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); }
UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_api_type(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_mutable_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len);
}
UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_resize_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(20, 32), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 16)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_refresh_delay(msg);
@ -96,20 +97,20 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu
return sub;
}
UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_mutable_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) {
return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len);
return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
}
UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_resize_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_ApiConfigSource_add_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(24, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 16)) = value;
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 24)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_request_timeout(msg);
@ -121,7 +122,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu
return sub;
}
UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, envoy_api_v2_core_RateLimitSettings* value) {
UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(16, 24)) = value;
UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(20, 32)) = value;
}
UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) {
struct envoy_api_v2_core_RateLimitSettings* sub = (struct envoy_api_v2_core_RateLimitSettings*)envoy_api_v2_core_ApiConfigSource_rate_limit_settings(msg);
@ -132,6 +133,9 @@ UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConf
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_only(envoy_api_v2_core_ApiConfigSource *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value;
}
/* envoy.api.v2.core.AggregatedConfigSource */

@ -0,0 +1,35 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/core/http_uri.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/core/http_uri.upb.h"
#include "google/protobuf/duration.upb.h"
#include "gogoproto/gogo.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_core_HttpUri_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_core_HttpUri__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
{3, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_core_HttpUri_msginit = {
&envoy_api_v2_core_HttpUri_submsgs[0],
&envoy_api_v2_core_HttpUri__fields[0],
UPB_SIZE(24, 48), 3, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,80 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/core/http_uri.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_
#define ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_core_HttpUri;
typedef struct envoy_api_v2_core_HttpUri envoy_api_v2_core_HttpUri;
extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit;
struct google_protobuf_Duration;
extern const upb_msglayout google_protobuf_Duration_msginit;
/* envoy.api.v2.core.HttpUri */
UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_new(upb_arena *arena) {
return (envoy_api_v2_core_HttpUri *)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena);
}
UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_core_HttpUri *ret = envoy_api_v2_core_HttpUri_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_HttpUri_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_core_HttpUri_serialize(const envoy_api_v2_core_HttpUri *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_core_HttpUri_msginit, arena, len);
}
typedef enum {
envoy_api_v2_core_HttpUri_http_upstream_type_cluster = 2,
envoy_api_v2_core_HttpUri_http_upstream_type_NOT_SET = 0
} envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases;
UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri* msg) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); }
UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); }
UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); }
UPB_INLINE void envoy_api_v2_core_HttpUri_set_uri(envoy_api_v2_core_HttpUri *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_core_HttpUri_set_cluster(envoy_api_v2_core_HttpUri *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2);
}
UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpUri_timeout(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_HttpUri_set_timeout(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ */

@ -52,23 +52,29 @@ const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit = {
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_core_Http2ProtocolOptions_submsgs[4] = {
static const upb_msglayout *const envoy_api_v2_core_Http2ProtocolOptions_submsgs[9] = {
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_core_Http2ProtocolOptions__fields[6] = {
static const upb_msglayout_field envoy_api_v2_core_Http2ProtocolOptions__fields[12] = {
{1, UPB_SIZE(4, 8), 0, 0, 11, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
{3, UPB_SIZE(12, 24), 0, 0, 11, 1},
{4, UPB_SIZE(16, 32), 0, 0, 11, 1},
{5, UPB_SIZE(0, 0), 0, 0, 8, 1},
{6, UPB_SIZE(1, 1), 0, 0, 8, 1},
{7, UPB_SIZE(20, 40), 0, 0, 11, 1},
{8, UPB_SIZE(24, 48), 0, 0, 11, 1},
{9, UPB_SIZE(28, 56), 0, 0, 11, 1},
{10, UPB_SIZE(32, 64), 0, 0, 11, 1},
{11, UPB_SIZE(36, 72), 0, 0, 11, 1},
{12, UPB_SIZE(2, 2), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit = {
&envoy_api_v2_core_Http2ProtocolOptions_submsgs[0],
&envoy_api_v2_core_Http2ProtocolOptions__fields[0],
UPB_SIZE(20, 40), 6, false,
UPB_SIZE(40, 80), 12, false,
};
static const upb_msglayout *const envoy_api_v2_core_GrpcProtocolOptions_submsgs[1] = {

@ -145,6 +145,12 @@ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2Prot
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); }
UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_connect(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_metadata(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); }
UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); }
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_hpack_table_size(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value;
@ -200,6 +206,69 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_connect(envoy_a
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_metadata(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_stream_error_on_invalid_http_messaging(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
}
/* envoy.api.v2.core.GrpcProtocolOptions */

@ -0,0 +1,58 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* udpa/data/orca/v1/orca_load_report.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "udpa/data/orca/v1/orca_load_report.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const udpa_data_orca_v1_OrcaLoadReport_submsgs[2] = {
&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit,
&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit,
};
static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport__fields[5] = {
{1, UPB_SIZE(0, 0), 0, 0, 1, 1},
{2, UPB_SIZE(8, 8), 0, 0, 1, 1},
{3, UPB_SIZE(16, 16), 0, 0, 4, 1},
{4, UPB_SIZE(24, 24), 0, 0, 11, 3},
{5, UPB_SIZE(28, 32), 0, 1, 11, 3},
};
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = {
&udpa_data_orca_v1_OrcaLoadReport_submsgs[0],
&udpa_data_orca_v1_OrcaLoadReport__fields[0],
UPB_SIZE(32, 40), 5, false,
};
static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[2] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(0, 0), 0, 0, 1, 1},
};
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = {
NULL,
&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[2] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(0, 0), 0, 0, 1, 1},
};
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit = {
NULL,
&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,144 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* udpa/data/orca/v1/orca_load_report.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_
#define UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct udpa_data_orca_v1_OrcaLoadReport;
struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry;
struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry;
typedef struct udpa_data_orca_v1_OrcaLoadReport udpa_data_orca_v1_OrcaLoadReport;
typedef struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry;
typedef struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry;
extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit;
extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit;
extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit;
/* udpa.data.orca.v1.OrcaLoadReport */
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_new(upb_arena *arena) {
return (udpa_data_orca_v1_OrcaLoadReport *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_msginit, arena);
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_parse(const char *buf, size_t size,
upb_arena *arena) {
udpa_data_orca_v1_OrcaLoadReport *ret = udpa_data_orca_v1_OrcaLoadReport_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_serialize(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena, len);
}
UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); }
UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_mem_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); }
UPB_INLINE uint64_t udpa_data_orca_v1_OrcaLoadReport_rps(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); }
UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const* udpa_data_orca_v1_OrcaLoadReport_request_cost(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); }
UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const* udpa_data_orca_v1_OrcaLoadReport_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_cpu_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) {
UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_mem_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) {
UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_rps(udpa_data_orca_v1_OrcaLoadReport *msg, uint64_t value) {
UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value;
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) {
return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_resize_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) {
return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_add_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) {
struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(24, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) {
return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_resize_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) {
return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_add_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) {
struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
/* udpa.data.orca.v1.OrcaLoadReport.RequestCostEntry */
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(upb_arena *arena) {
return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena);
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_parse(const char *buf, size_t size,
upb_arena *arena) {
udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *ret = udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena, len);
}
UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); }
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, double value) {
UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value;
}
/* udpa.data.orca.v1.OrcaLoadReport.UtilizationEntry */
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(upb_arena *arena) {
return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena);
}
UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_parse(const char *buf, size_t size,
upb_arena *arena) {
udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *ret = udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena, len);
}
UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); }
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, double value) {
UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ */

@ -35,6 +35,7 @@
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/pair.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/string_view.h"
namespace grpc_core {
@ -42,8 +43,14 @@ struct StringLess {
bool operator()(const char* a, const char* b) const {
return strcmp(a, b) < 0;
}
bool operator()(const UniquePtr<char>& k1, const UniquePtr<char>& k2) const {
return strcmp(k1.get(), k2.get()) < 0;
bool operator()(const UniquePtr<char>& a, const UniquePtr<char>& b) const {
return strcmp(a.get(), b.get()) < 0;
}
bool operator()(const StringView& a, const StringView& b) const {
const size_t min_size = std::min(a.size(), b.size());
int c = strncmp(a.data(), b.data(), min_size);
if (c != 0) return c < 0;
return a.size() < b.size();
}
};

@ -103,6 +103,8 @@ class RefCountedPtr {
if (value_ != nullptr) value_->Unref();
}
void swap(RefCountedPtr& other) { std::swap(value_, other.value_); }
// If value is non-null, we take ownership of a ref to it.
void reset(T* value = nullptr) {
if (value_ != nullptr) value_->Unref();

@ -1020,7 +1020,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) {
if (error != GRPC_ERROR_NONE) {
cb = tcp->write_cb;
tcp->write_cb = nullptr;
cb->cb(cb->cb_arg, error);
GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_REF(error));
TCP_UNREF(tcp, "write");
return;
}
@ -1030,6 +1030,8 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) {
gpr_log(GPR_INFO, "write: delayed");
}
notify_on_write(tcp);
// tcp_flush does not populate error if it has returned false.
GPR_DEBUG_ASSERT(error == GRPC_ERROR_NONE);
} else {
cb = tcp->write_cb;
tcp->write_cb = nullptr;
@ -1037,6 +1039,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) {
const char* str = grpc_error_string(error);
gpr_log(GPR_INFO, "write: %s", str);
}
// No need to take a ref on error since tcp_flush provides a ref.
GRPC_CLOSURE_SCHED(cb, error);
TCP_UNREF(tcp, "write");
}

@ -208,7 +208,11 @@ static InternedSliceRefcount* InternNewStringLocked(slice_shard* shard,
InternedSliceRefcount* s =
static_cast<InternedSliceRefcount*>(gpr_malloc(sizeof(*s) + len));
new (s) grpc_core::InternedSliceRefcount(len, hash, shard->strs[shard_idx]);
memcpy(reinterpret_cast<char*>(s + 1), buffer, len);
// TODO(arjunroy): Investigate why hpack tried to intern the nullptr string.
// https://github.com/grpc/grpc/pull/20110#issuecomment-526729282
if (len > 0) {
memcpy(reinterpret_cast<char*>(s + 1), buffer, len);
}
shard->strs[shard_idx] = s;
shard->count++;
if (shard->count > shard->capacity * 2) {

@ -53,76 +53,77 @@ static constexpr uint8_t g_bytes[] = {
99, 45, 112, 114, 101, 118, 105, 111, 117, 115, 45, 114, 112, 99, 45,
97, 116, 116, 101, 109, 112, 116, 115, 103, 114, 112, 99, 45, 114, 101,
116, 114, 121, 45, 112, 117, 115, 104, 98, 97, 99, 107, 45, 109, 115,
103, 114, 112, 99, 45, 116, 105, 109, 101, 111, 117, 116, 49, 50, 51,
52, 103, 114, 112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, 95,
114, 101, 97, 100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, 111,
117, 116, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, 117,
101, 115, 116, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116,
101, 115, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, 112,
111, 110, 115, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121,
116, 101, 115, 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, 46,
76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, 97,
108, 97, 110, 99, 101, 76, 111, 97, 100, 47, 101, 110, 118, 111, 121,
46, 115, 101, 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115,
116, 97, 116, 115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112,
111, 114, 116, 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83,
116, 114, 101, 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47,
101, 110, 118, 111, 121, 46, 97, 112, 105, 46, 118, 50, 46, 69, 110,
100, 112, 111, 105, 110, 116, 68, 105, 115, 99, 111, 118, 101, 114, 121,
83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 69,
110, 100, 112, 111, 105, 110, 116, 115, 47, 103, 114, 112, 99, 46, 104,
101, 97, 108, 116, 104, 46, 118, 49, 46, 72, 101, 97, 108, 116, 104,
47, 87, 97, 116, 99, 104, 47, 101, 110, 118, 111, 121, 46, 115, 101,
114, 118, 105, 99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121,
46, 118, 50, 46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68,
105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101,
47, 83, 116, 114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116,
101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108,
97, 116, 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103,
122, 105, 112, 71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100,
101, 120, 46, 104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112,
115, 50, 48, 48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48,
48, 52, 48, 52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99,
104, 97, 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102,
108, 97, 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103,
117, 97, 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103,
101, 115, 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45,
99, 111, 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111,
114, 105, 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117,
116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104,
101, 45, 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110,
116, 45, 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111,
110, 116, 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99,
111, 110, 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111,
110, 116, 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99,
111, 110, 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111,
107, 105, 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101,
99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102,
45, 109, 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105,
101, 100, 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101,
45, 109, 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105,
102, 45, 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105,
110, 99, 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101,
100, 108, 105, 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97,
120, 45, 102, 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121,
45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114,
111, 120, 121, 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105,
111, 110, 114, 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114,
101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116,
101, 114, 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111,
107, 105, 101, 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115,
112, 111, 114, 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114,
97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103,
118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104,
101, 110, 116, 105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105,
116, 121, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105,
99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99,
80, 85, 84, 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105,
100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101,
105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101,
102, 108, 97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116,
105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105,
112};
120, 45, 101, 110, 100, 112, 111, 105, 110, 116, 45, 108, 111, 97, 100,
45, 109, 101, 116, 114, 105, 99, 115, 45, 98, 105, 110, 103, 114, 112,
99, 45, 116, 105, 109, 101, 111, 117, 116, 49, 50, 51, 52, 103, 114,
112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97,
100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103,
114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, 117, 101, 115, 116,
95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 103,
114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, 112, 111, 110, 115,
101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115,
47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, 46, 76, 111, 97,
100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, 97, 108, 97, 110,
99, 101, 76, 111, 97, 100, 47, 101, 110, 118, 111, 121, 46, 115, 101,
114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, 116, 97, 116,
115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, 111, 114, 116,
105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101,
97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 101, 110, 118,
111, 121, 46, 97, 112, 105, 46, 118, 50, 46, 69, 110, 100, 112, 111,
105, 110, 116, 68, 105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114,
118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 69, 110, 100, 112,
111, 105, 110, 116, 115, 47, 103, 114, 112, 99, 46, 104, 101, 97, 108,
116, 104, 46, 118, 49, 46, 72, 101, 97, 108, 116, 104, 47, 87, 97,
116, 99, 104, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, 105,
99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, 50,
46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, 99,
111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116,
114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 82,
101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, 97, 116, 101,
103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, 105, 112,
71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100, 101, 120, 46,
104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112, 115, 50, 48,
48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 52, 48,
52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114,
115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116,
101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103,
101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97,
99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110,
116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103,
105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111,
114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99,
111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100,
105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101,
110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116,
101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101,
110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116,
101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101,
100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101,
120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97,
116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45,
115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97,
116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117,
110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101,
108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 105,
110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, 102,
111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, 117,
116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, 121,
45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 114,
97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114,
101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 115,
101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, 101,
115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, 114,
116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, 115,
102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, 114,
121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116,
105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105, 116, 121, 116,
114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116,
105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99, 80, 85, 84,
108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105, 100, 101, 110,
116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, 101,
110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108, 97,
116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116, 121,
44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112};
grpc_slice_refcount grpc_core::StaticSliceRefcount::kStaticSubRefcount;
@ -187,6 +188,7 @@ struct StaticMetadataCtx {
StaticSliceRefcount(102), StaticSliceRefcount(103),
StaticSliceRefcount(104), StaticSliceRefcount(105),
StaticSliceRefcount(106), StaticSliceRefcount(107),
StaticSliceRefcount(108),
};
const StaticMetadataSlice slices[GRPC_STATIC_MDSTR_COUNT] = {
@ -214,488 +216,494 @@ struct StaticMetadataCtx {
grpc_core::StaticMetadataSlice(&refcounts[20].base, 4, g_bytes + 278),
grpc_core::StaticMetadataSlice(&refcounts[21].base, 26, g_bytes + 282),
grpc_core::StaticMetadataSlice(&refcounts[22].base, 22, g_bytes + 308),
grpc_core::StaticMetadataSlice(&refcounts[23].base, 12, g_bytes + 330),
grpc_core::StaticMetadataSlice(&refcounts[24].base, 1, g_bytes + 342),
grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 343),
grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 344),
grpc_core::StaticMetadataSlice(&refcounts[27].base, 1, g_bytes + 345),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 19, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[30].base, 12, g_bytes + 365),
grpc_core::StaticMetadataSlice(&refcounts[31].base, 30, g_bytes + 377),
grpc_core::StaticMetadataSlice(&refcounts[32].base, 31, g_bytes + 407),
grpc_core::StaticMetadataSlice(&refcounts[33].base, 36, g_bytes + 438),
grpc_core::StaticMetadataSlice(&refcounts[34].base, 65, g_bytes + 474),
grpc_core::StaticMetadataSlice(&refcounts[35].base, 54, g_bytes + 539),
grpc_core::StaticMetadataSlice(&refcounts[36].base, 28, g_bytes + 593),
grpc_core::StaticMetadataSlice(&refcounts[37].base, 80, g_bytes + 621),
grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 11, g_bytes + 712),
grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 723),
grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 726),
grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 730),
grpc_core::StaticMetadataSlice(&refcounts[44].base, 11, g_bytes + 731),
grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 742),
grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 746),
grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 751),
grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 754),
grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 757),
grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 760),
grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 763),
grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 766),
grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 769),
grpc_core::StaticMetadataSlice(&refcounts[54].base, 14, g_bytes + 772),
grpc_core::StaticMetadataSlice(&refcounts[55].base, 13, g_bytes + 786),
grpc_core::StaticMetadataSlice(&refcounts[56].base, 15, g_bytes + 799),
grpc_core::StaticMetadataSlice(&refcounts[57].base, 13, g_bytes + 814),
grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 827),
grpc_core::StaticMetadataSlice(&refcounts[59].base, 27, g_bytes + 833),
grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 860),
grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 863),
grpc_core::StaticMetadataSlice(&refcounts[62].base, 13, g_bytes + 868),
grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 881),
grpc_core::StaticMetadataSlice(&refcounts[64].base, 19, g_bytes + 894),
grpc_core::StaticMetadataSlice(&refcounts[65].base, 16, g_bytes + 913),
grpc_core::StaticMetadataSlice(&refcounts[66].base, 14, g_bytes + 929),
grpc_core::StaticMetadataSlice(&refcounts[67].base, 16, g_bytes + 943),
grpc_core::StaticMetadataSlice(&refcounts[68].base, 13, g_bytes + 959),
grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 972),
grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 978),
grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 982),
grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 986),
grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 992),
grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 999),
grpc_core::StaticMetadataSlice(&refcounts[75].base, 8, g_bytes + 1003),
grpc_core::StaticMetadataSlice(&refcounts[76].base, 17, g_bytes + 1011),
grpc_core::StaticMetadataSlice(&refcounts[77].base, 13, g_bytes + 1028),
grpc_core::StaticMetadataSlice(&refcounts[78].base, 8, g_bytes + 1041),
grpc_core::StaticMetadataSlice(&refcounts[79].base, 19, g_bytes + 1049),
grpc_core::StaticMetadataSlice(&refcounts[80].base, 13, g_bytes + 1068),
grpc_core::StaticMetadataSlice(&refcounts[81].base, 4, g_bytes + 1081),
grpc_core::StaticMetadataSlice(&refcounts[82].base, 8, g_bytes + 1085),
grpc_core::StaticMetadataSlice(&refcounts[83].base, 12, g_bytes + 1093),
grpc_core::StaticMetadataSlice(&refcounts[84].base, 18, g_bytes + 1105),
grpc_core::StaticMetadataSlice(&refcounts[85].base, 19, g_bytes + 1123),
grpc_core::StaticMetadataSlice(&refcounts[86].base, 5, g_bytes + 1142),
grpc_core::StaticMetadataSlice(&refcounts[87].base, 7, g_bytes + 1147),
grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1154),
grpc_core::StaticMetadataSlice(&refcounts[89].base, 11, g_bytes + 1161),
grpc_core::StaticMetadataSlice(&refcounts[90].base, 6, g_bytes + 1172),
grpc_core::StaticMetadataSlice(&refcounts[91].base, 10, g_bytes + 1178),
grpc_core::StaticMetadataSlice(&refcounts[92].base, 25, g_bytes + 1188),
grpc_core::StaticMetadataSlice(&refcounts[93].base, 17, g_bytes + 1213),
grpc_core::StaticMetadataSlice(&refcounts[94].base, 4, g_bytes + 1230),
grpc_core::StaticMetadataSlice(&refcounts[95].base, 3, g_bytes + 1234),
grpc_core::StaticMetadataSlice(&refcounts[96].base, 16, g_bytes + 1237),
grpc_core::StaticMetadataSlice(&refcounts[97].base, 1, g_bytes + 1253),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, g_bytes + 1254),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1262),
grpc_core::StaticMetadataSlice(&refcounts[100].base, 16, g_bytes + 1270),
grpc_core::StaticMetadataSlice(&refcounts[101].base, 4, g_bytes + 1286),
grpc_core::StaticMetadataSlice(&refcounts[102].base, 3, g_bytes + 1290),
grpc_core::StaticMetadataSlice(&refcounts[103].base, 11, g_bytes + 1293),
grpc_core::StaticMetadataSlice(&refcounts[104].base, 16, g_bytes + 1304),
grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, g_bytes + 1320),
grpc_core::StaticMetadataSlice(&refcounts[106].base, 12, g_bytes + 1333),
grpc_core::StaticMetadataSlice(&refcounts[107].base, 21, g_bytes + 1345),
grpc_core::StaticMetadataSlice(&refcounts[23].base, 27, g_bytes + 330),
grpc_core::StaticMetadataSlice(&refcounts[24].base, 12, g_bytes + 357),
grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 369),
grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 370),
grpc_core::StaticMetadataSlice(&refcounts[27].base, 1, g_bytes + 371),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 1, g_bytes + 372),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
grpc_core::StaticMetadataSlice(&refcounts[30].base, 19, g_bytes + 373),
grpc_core::StaticMetadataSlice(&refcounts[31].base, 12, g_bytes + 392),
grpc_core::StaticMetadataSlice(&refcounts[32].base, 30, g_bytes + 404),
grpc_core::StaticMetadataSlice(&refcounts[33].base, 31, g_bytes + 434),
grpc_core::StaticMetadataSlice(&refcounts[34].base, 36, g_bytes + 465),
grpc_core::StaticMetadataSlice(&refcounts[35].base, 65, g_bytes + 501),
grpc_core::StaticMetadataSlice(&refcounts[36].base, 54, g_bytes + 566),
grpc_core::StaticMetadataSlice(&refcounts[37].base, 28, g_bytes + 620),
grpc_core::StaticMetadataSlice(&refcounts[38].base, 80, g_bytes + 648),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735),
grpc_core::StaticMetadataSlice(&refcounts[41].base, 11, g_bytes + 739),
grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750),
grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753),
grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757),
grpc_core::StaticMetadataSlice(&refcounts[45].base, 11, g_bytes + 758),
grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769),
grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773),
grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778),
grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781),
grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784),
grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787),
grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790),
grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793),
grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796),
grpc_core::StaticMetadataSlice(&refcounts[55].base, 14, g_bytes + 799),
grpc_core::StaticMetadataSlice(&refcounts[56].base, 13, g_bytes + 813),
grpc_core::StaticMetadataSlice(&refcounts[57].base, 15, g_bytes + 826),
grpc_core::StaticMetadataSlice(&refcounts[58].base, 13, g_bytes + 841),
grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854),
grpc_core::StaticMetadataSlice(&refcounts[60].base, 27, g_bytes + 860),
grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887),
grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890),
grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 895),
grpc_core::StaticMetadataSlice(&refcounts[64].base, 13, g_bytes + 908),
grpc_core::StaticMetadataSlice(&refcounts[65].base, 19, g_bytes + 921),
grpc_core::StaticMetadataSlice(&refcounts[66].base, 16, g_bytes + 940),
grpc_core::StaticMetadataSlice(&refcounts[67].base, 14, g_bytes + 956),
grpc_core::StaticMetadataSlice(&refcounts[68].base, 16, g_bytes + 970),
grpc_core::StaticMetadataSlice(&refcounts[69].base, 13, g_bytes + 986),
grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999),
grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 1005),
grpc_core::StaticMetadataSlice(&refcounts[72].base, 4, g_bytes + 1009),
grpc_core::StaticMetadataSlice(&refcounts[73].base, 6, g_bytes + 1013),
grpc_core::StaticMetadataSlice(&refcounts[74].base, 7, g_bytes + 1019),
grpc_core::StaticMetadataSlice(&refcounts[75].base, 4, g_bytes + 1026),
grpc_core::StaticMetadataSlice(&refcounts[76].base, 8, g_bytes + 1030),
grpc_core::StaticMetadataSlice(&refcounts[77].base, 17, g_bytes + 1038),
grpc_core::StaticMetadataSlice(&refcounts[78].base, 13, g_bytes + 1055),
grpc_core::StaticMetadataSlice(&refcounts[79].base, 8, g_bytes + 1068),
grpc_core::StaticMetadataSlice(&refcounts[80].base, 19, g_bytes + 1076),
grpc_core::StaticMetadataSlice(&refcounts[81].base, 13, g_bytes + 1095),
grpc_core::StaticMetadataSlice(&refcounts[82].base, 4, g_bytes + 1108),
grpc_core::StaticMetadataSlice(&refcounts[83].base, 8, g_bytes + 1112),
grpc_core::StaticMetadataSlice(&refcounts[84].base, 12, g_bytes + 1120),
grpc_core::StaticMetadataSlice(&refcounts[85].base, 18, g_bytes + 1132),
grpc_core::StaticMetadataSlice(&refcounts[86].base, 19, g_bytes + 1150),
grpc_core::StaticMetadataSlice(&refcounts[87].base, 5, g_bytes + 1169),
grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1174),
grpc_core::StaticMetadataSlice(&refcounts[89].base, 7, g_bytes + 1181),
grpc_core::StaticMetadataSlice(&refcounts[90].base, 11, g_bytes + 1188),
grpc_core::StaticMetadataSlice(&refcounts[91].base, 6, g_bytes + 1199),
grpc_core::StaticMetadataSlice(&refcounts[92].base, 10, g_bytes + 1205),
grpc_core::StaticMetadataSlice(&refcounts[93].base, 25, g_bytes + 1215),
grpc_core::StaticMetadataSlice(&refcounts[94].base, 17, g_bytes + 1240),
grpc_core::StaticMetadataSlice(&refcounts[95].base, 4, g_bytes + 1257),
grpc_core::StaticMetadataSlice(&refcounts[96].base, 3, g_bytes + 1261),
grpc_core::StaticMetadataSlice(&refcounts[97].base, 16, g_bytes + 1264),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 1, g_bytes + 1280),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1281),
grpc_core::StaticMetadataSlice(&refcounts[100].base, 8, g_bytes + 1289),
grpc_core::StaticMetadataSlice(&refcounts[101].base, 16, g_bytes + 1297),
grpc_core::StaticMetadataSlice(&refcounts[102].base, 4, g_bytes + 1313),
grpc_core::StaticMetadataSlice(&refcounts[103].base, 3, g_bytes + 1317),
grpc_core::StaticMetadataSlice(&refcounts[104].base, 11, g_bytes + 1320),
grpc_core::StaticMetadataSlice(&refcounts[105].base, 16, g_bytes + 1331),
grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, g_bytes + 1347),
grpc_core::StaticMetadataSlice(&refcounts[107].base, 12, g_bytes + 1360),
grpc_core::StaticMetadataSlice(&refcounts[108].base, 21, g_bytes + 1372),
};
StaticMetadata static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = {
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[3].base, 10, g_bytes + 19),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
0),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5),
grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 723),
grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750),
1),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5),
grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 726),
grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753),
2),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0),
grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 730),
grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757),
3),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0),
grpc_core::StaticMetadataSlice(&refcounts[44].base, 11,
g_bytes + 731),
grpc_core::StaticMetadataSlice(&refcounts[45].base, 11,
g_bytes + 758),
4),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29),
grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 742),
grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769),
5),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29),
grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 746),
grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773),
6),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 751),
grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778),
7),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 754),
grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781),
8),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 757),
grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784),
9),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 760),
grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787),
10),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 763),
grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790),
11),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 766),
grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793),
12),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12),
grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 769),
grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796),
13),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[54].base, 14,
g_bytes + 772),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[55].base, 14,
g_bytes + 799),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
14),
StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15,
g_bytes + 186),
grpc_core::StaticMetadataSlice(&refcounts[55].base, 13,
g_bytes + 786),
grpc_core::StaticMetadataSlice(&refcounts[56].base, 13,
g_bytes + 813),
15),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[56].base, 15,
g_bytes + 799),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[57].base, 15,
g_bytes + 826),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
16),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[57].base, 13,
g_bytes + 814),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[58].base, 13,
g_bytes + 841),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
17),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 827),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
18),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[59].base, 27,
g_bytes + 833),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[60].base, 27,
g_bytes + 860),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
19),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 860),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
20),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 863),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
21),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[62].base, 13,
g_bytes + 868),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[63].base, 13,
g_bytes + 895),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
22),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[63].base, 13,
g_bytes + 881),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[64].base, 13,
g_bytes + 908),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
23),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[64].base, 19,
g_bytes + 894),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[65].base, 19,
g_bytes + 921),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
24),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[15].base, 16,
g_bytes + 170),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
25),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[65].base, 16,
g_bytes + 913),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[66].base, 16,
g_bytes + 940),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
26),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[66].base, 14,
g_bytes + 929),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[67].base, 14,
g_bytes + 956),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
27),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[67].base, 16,
g_bytes + 943),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[68].base, 16,
g_bytes + 970),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
28),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[68].base, 13,
g_bytes + 959),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[69].base, 13,
g_bytes + 986),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
29),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[14].base, 12,
g_bytes + 158),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
30),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 972),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
31),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 978),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[71].base, 4,
g_bytes + 1005),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
32),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 982),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[72].base, 4,
g_bytes + 1009),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
33),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 986),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[73].base, 6,
g_bytes + 1013),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
34),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 992),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[74].base, 7,
g_bytes + 1019),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
35),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 999),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[75].base, 4,
g_bytes + 1026),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
36),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[20].base, 4, g_bytes + 278),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
37),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[75].base, 8,
g_bytes + 1003),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[76].base, 8,
g_bytes + 1030),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
38),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[76].base, 17,
g_bytes + 1011),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[77].base, 17,
g_bytes + 1038),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
39),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[77].base, 13,
g_bytes + 1028),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[78].base, 13,
g_bytes + 1055),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
40),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[78].base, 8,
g_bytes + 1041),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[79].base, 8,
g_bytes + 1068),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
41),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[79].base, 19,
g_bytes + 1049),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[80].base, 19,
g_bytes + 1076),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
42),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[80].base, 13,
g_bytes + 1068),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[81].base, 13,
g_bytes + 1095),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
43),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[81].base, 4,
g_bytes + 1081),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[82].base, 4,
g_bytes + 1108),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
44),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[82].base, 8,
g_bytes + 1085),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[83].base, 8,
g_bytes + 1112),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
45),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[83].base, 12,
g_bytes + 1093),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[84].base, 12,
g_bytes + 1120),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
46),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[84].base, 18,
g_bytes + 1105),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[85].base, 18,
g_bytes + 1132),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
47),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[85].base, 19,
g_bytes + 1123),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[86].base, 19,
g_bytes + 1150),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
48),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[86].base, 5,
g_bytes + 1142),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[87].base, 5,
g_bytes + 1169),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
49),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[87].base, 7,
g_bytes + 1147),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[88].base, 7,
g_bytes + 1174),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
50),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[88].base, 7,
g_bytes + 1154),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[89].base, 7,
g_bytes + 1181),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
51),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[89].base, 11,
g_bytes + 1161),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[90].base, 11,
g_bytes + 1188),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
52),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[90].base, 6,
g_bytes + 1172),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[91].base, 6,
g_bytes + 1199),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
53),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[91].base, 10,
g_bytes + 1178),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[92].base, 10,
g_bytes + 1205),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
54),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[92].base, 25,
g_bytes + 1188),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[93].base, 25,
g_bytes + 1215),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
55),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[93].base, 17,
g_bytes + 1213),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[94].base, 17,
g_bytes + 1240),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
56),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[19].base, 10,
g_bytes + 268),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
57),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[94].base, 4,
g_bytes + 1230),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[95].base, 4,
g_bytes + 1257),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
58),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[95].base, 3,
g_bytes + 1234),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[96].base, 3,
g_bytes + 1261),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
59),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[96].base, 16,
g_bytes + 1237),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[97].base, 16,
g_bytes + 1264),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
60),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50),
grpc_core::StaticMetadataSlice(&refcounts[97].base, 1,
g_bytes + 1253),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 1,
g_bytes + 1280),
61),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50),
grpc_core::StaticMetadataSlice(&refcounts[24].base, 1, g_bytes + 342),
grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 369),
62),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50),
grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 343),
grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 370),
63),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 8,
g_bytes + 1254),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8,
g_bytes + 1281),
64),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735),
65),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77),
grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728),
66),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[5].base, 2, g_bytes + 36),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8,
g_bytes + 1262),
grpc_core::StaticMetadataSlice(&refcounts[100].base, 8,
g_bytes + 1289),
67),
StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[14].base, 12,
g_bytes + 158),
grpc_core::StaticMetadataSlice(&refcounts[100].base, 16,
g_bytes + 1270),
grpc_core::StaticMetadataSlice(&refcounts[101].base, 16,
g_bytes + 1297),
68),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29),
grpc_core::StaticMetadataSlice(&refcounts[101].base, 4,
g_bytes + 1286),
grpc_core::StaticMetadataSlice(&refcounts[102].base, 4,
g_bytes + 1313),
69),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5),
grpc_core::StaticMetadataSlice(&refcounts[102].base, 3,
g_bytes + 1290),
grpc_core::StaticMetadataSlice(&refcounts[103].base, 3,
g_bytes + 1317),
70),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[16].base, 15,
g_bytes + 186),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
71),
StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[15].base, 16,
g_bytes + 170),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 8,
g_bytes + 1254),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8,
g_bytes + 1281),
72),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[15].base, 16,
g_bytes + 170),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735),
73),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[103].base, 11,
g_bytes + 1293),
grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346),
grpc_core::StaticMetadataSlice(&refcounts[104].base, 11,
g_bytes + 1320),
grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373),
74),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 8,
g_bytes + 1254),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8,
g_bytes + 1281),
75),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728),
76),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[104].base, 16,
g_bytes + 1304),
grpc_core::StaticMetadataSlice(&refcounts[105].base, 16,
g_bytes + 1331),
77),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735),
78),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[105].base, 13,
g_bytes + 1320),
grpc_core::StaticMetadataSlice(&refcounts[106].base, 13,
g_bytes + 1347),
79),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[106].base, 12,
g_bytes + 1333),
grpc_core::StaticMetadataSlice(&refcounts[107].base, 12,
g_bytes + 1360),
80),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90),
grpc_core::StaticMetadataSlice(&refcounts[107].base, 21,
g_bytes + 1345),
grpc_core::StaticMetadataSlice(&refcounts[108].base, 21,
g_bytes + 1372),
81),
StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15,
g_bytes + 186),
grpc_core::StaticMetadataSlice(&refcounts[98].base, 8,
g_bytes + 1254),
grpc_core::StaticMetadataSlice(&refcounts[99].base, 8,
g_bytes + 1281),
82),
StaticMetadata(
grpc_core::StaticMetadataSlice(&refcounts[16].base, 15,
g_bytes + 186),
grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708),
grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735),
83),
StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15,
g_bytes + 186),
grpc_core::StaticMetadataSlice(&refcounts[105].base, 13,
g_bytes + 1320),
grpc_core::StaticMetadataSlice(&refcounts[106].base, 13,
g_bytes + 1347),
84),
};
@ -1181,17 +1189,17 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4};
static const int8_t elems_r[] = {
15, 10, -8, 0, 2, -43, -80, -44, 0, 4, -8, 0, 0, 0, 6, -1,
-8, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, -65, 0, -68, -69, -50, -72, -73, 0, 32, 31,
30, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17,
16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 4, 3,
3, 7, 0, 0, 0, 0, 0, 0, -5, 0};
15, 10, -8, 0, 2, -43, -81, -44, 0, 4, -8, 0, 0, 0, 6, -1,
-8, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, -67, 0, -38, -50, -56, -76, 0, 46, 28,
27, 26, 25, 24, 23, 23, 22, 21, 20, 19, 24, 16, 15, 14, 13, 15,
14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 4, 3, 2, 3,
2, 2, 6, 0, 0, 0, 0, 0, 0, -6, 0};
static uint32_t elems_phash(uint32_t i) {
i -= 43;
uint32_t x = i % 106;
uint32_t y = i / 106;
i -= 44;
uint32_t x = i % 107;
uint32_t y = i / 107;
uint32_t h = x;
if (y < GPR_ARRAY_SIZE(elems_r)) {
uint32_t delta = (uint32_t)elems_r[y];
@ -1201,29 +1209,26 @@ static uint32_t elems_phash(uint32_t i) {
}
static const uint16_t elem_keys[] = {
263, 264, 265, 266, 267, 268, 269, 1118, 1119, 1756, 149, 150,
477, 478, 1648, 43, 44, 1010, 1011, 1540, 1767, 780, 781, 639,
853, 1659, 2080, 2188, 5860, 6076, 6184, 6400, 6508, 6616, 6724, 6832,
1783, 6940, 7048, 7156, 7264, 7372, 7480, 7588, 7696, 7804, 7912, 8020,
8128, 8236, 8344, 6292, 8452, 8560, 8668, 8776, 8884, 8992, 9100, 9208,
9316, 9424, 9532, 9640, 9748, 9856, 9964, 1178, 533, 10072, 10180, 210,
10288, 1184, 1185, 1186, 1187, 1070, 10396, 1826, 11152, 0, 0, 0,
1718, 0, 1833, 0, 0, 352, 0, 1612, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0};
266, 267, 268, 269, 270, 271, 272, 1129, 1130, 1773, 151,
152, 482, 483, 1664, 44, 45, 1020, 1021, 1555, 1784, 788,
789, 645, 861, 1675, 2100, 2209, 6024, 6569, 6787, 6896, 7005,
7114, 7223, 7332, 1800, 7441, 7550, 7659, 7768, 7877, 8095, 8204,
8313, 8422, 6678, 6460, 7986, 8531, 8640, 6351, 8749, 8858, 8967,
9076, 9185, 9294, 9403, 9512, 9621, 6242, 9730, 9839, 9948, 10057,
10166, 1189, 538, 10275, 10384, 212, 10493, 1195, 1196, 1197, 1198,
1080, 10602, 1843, 11365, 0, 0, 0, 1734, 0, 1850, 0,
0, 0, 356, 1627};
static const uint8_t elem_idxs[] = {
7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3,
4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 16, 17, 19,
20, 21, 22, 23, 15, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36,
38, 39, 40, 18, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 82,
74, 255, 255, 255, 72, 255, 84, 255, 255, 0, 255, 68};
7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3,
4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 19, 21, 22,
23, 24, 26, 27, 15, 28, 29, 31, 32, 33, 35, 36, 38, 39, 20, 18,
34, 40, 41, 17, 42, 43, 44, 45, 46, 47, 48, 49, 50, 16, 51, 52,
53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 82,
74, 255, 255, 255, 72, 255, 84, 255, 255, 255, 0, 68};
grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) {
if (a == -1 || b == -1) return GRPC_MDNULL;
uint32_t k = static_cast<uint32_t>(a * 108 + b);
uint32_t k = static_cast<uint32_t>(a * 109 + b);
uint32_t h = elems_phash(k);
return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k &&
elem_idxs[h] != 255

@ -36,7 +36,7 @@
static_assert(
std::is_trivially_destructible<grpc_core::StaticMetadataSlice>::value,
"grpc_core::StaticMetadataSlice must be trivially destructible.");
#define GRPC_STATIC_MDSTR_COUNT 108
#define GRPC_STATIC_MDSTR_COUNT 109
void grpc_init_static_metadata_ctx(void);
void grpc_destroy_static_metadata_ctx(void);
@ -102,185 +102,187 @@ inline const grpc_core::StaticMetadataSlice* grpc_static_slice_table() {
#define GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS (grpc_static_slice_table()[21])
/* "grpc-retry-pushback-ms" */
#define GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS (grpc_static_slice_table()[22])
/* "x-endpoint-load-metrics-bin" */
#define GRPC_MDSTR_X_ENDPOINT_LOAD_METRICS_BIN (grpc_static_slice_table()[23])
/* "grpc-timeout" */
#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table()[23])
#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table()[24])
/* "1" */
#define GRPC_MDSTR_1 (grpc_static_slice_table()[24])
#define GRPC_MDSTR_1 (grpc_static_slice_table()[25])
/* "2" */
#define GRPC_MDSTR_2 (grpc_static_slice_table()[25])
#define GRPC_MDSTR_2 (grpc_static_slice_table()[26])
/* "3" */
#define GRPC_MDSTR_3 (grpc_static_slice_table()[26])
#define GRPC_MDSTR_3 (grpc_static_slice_table()[27])
/* "4" */
#define GRPC_MDSTR_4 (grpc_static_slice_table()[27])
#define GRPC_MDSTR_4 (grpc_static_slice_table()[28])
/* "" */
#define GRPC_MDSTR_EMPTY (grpc_static_slice_table()[28])
#define GRPC_MDSTR_EMPTY (grpc_static_slice_table()[29])
/* "grpc.wait_for_ready" */
#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table()[29])
#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table()[30])
/* "grpc.timeout" */
#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table()[30])
#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table()[31])
/* "grpc.max_request_message_bytes" */
#define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \
(grpc_static_slice_table()[31])
(grpc_static_slice_table()[32])
/* "grpc.max_response_message_bytes" */
#define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \
(grpc_static_slice_table()[32])
(grpc_static_slice_table()[33])
/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \
(grpc_static_slice_table()[33])
(grpc_static_slice_table()[34])
/* "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats" */
#define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V2_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS \
(grpc_static_slice_table()[34])
(grpc_static_slice_table()[35])
/* "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints" */
#define GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS \
(grpc_static_slice_table()[35])
(grpc_static_slice_table()[36])
/* "/grpc.health.v1.Health/Watch" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_HEALTH_DOT_V1_DOT_HEALTH_SLASH_WATCH \
(grpc_static_slice_table()[36])
(grpc_static_slice_table()[37])
/* "/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources"
*/
#define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES \
(grpc_static_slice_table()[37])
(grpc_static_slice_table()[38])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[38])
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[39])
/* "gzip" */
#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[39])
#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[40])
/* "stream/gzip" */
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[40])
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[41])
/* "GET" */
#define GRPC_MDSTR_GET (grpc_static_slice_table()[41])
#define GRPC_MDSTR_GET (grpc_static_slice_table()[42])
/* "POST" */
#define GRPC_MDSTR_POST (grpc_static_slice_table()[42])
#define GRPC_MDSTR_POST (grpc_static_slice_table()[43])
/* "/" */
#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[43])
#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[44])
/* "/index.html" */
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[44])
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[45])
/* "http" */
#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[45])
#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[46])
/* "https" */
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[46])
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[47])
/* "200" */
#define GRPC_MDSTR_200 (grpc_static_slice_table()[47])
#define GRPC_MDSTR_200 (grpc_static_slice_table()[48])
/* "204" */
#define GRPC_MDSTR_204 (grpc_static_slice_table()[48])
#define GRPC_MDSTR_204 (grpc_static_slice_table()[49])
/* "206" */
#define GRPC_MDSTR_206 (grpc_static_slice_table()[49])
#define GRPC_MDSTR_206 (grpc_static_slice_table()[50])
/* "304" */
#define GRPC_MDSTR_304 (grpc_static_slice_table()[50])
#define GRPC_MDSTR_304 (grpc_static_slice_table()[51])
/* "400" */
#define GRPC_MDSTR_400 (grpc_static_slice_table()[51])
#define GRPC_MDSTR_400 (grpc_static_slice_table()[52])
/* "404" */
#define GRPC_MDSTR_404 (grpc_static_slice_table()[52])
#define GRPC_MDSTR_404 (grpc_static_slice_table()[53])
/* "500" */
#define GRPC_MDSTR_500 (grpc_static_slice_table()[53])
#define GRPC_MDSTR_500 (grpc_static_slice_table()[54])
/* "accept-charset" */
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[54])
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[55])
/* "gzip, deflate" */
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[55])
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[56])
/* "accept-language" */
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[56])
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[57])
/* "accept-ranges" */
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[57])
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[58])
/* "accept" */
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[58])
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[59])
/* "access-control-allow-origin" */
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[59])
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[60])
/* "age" */
#define GRPC_MDSTR_AGE (grpc_static_slice_table()[60])
#define GRPC_MDSTR_AGE (grpc_static_slice_table()[61])
/* "allow" */
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[61])
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[62])
/* "authorization" */
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[62])
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[63])
/* "cache-control" */
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[63])
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[64])
/* "content-disposition" */
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[64])
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[65])
/* "content-language" */
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[65])
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[66])
/* "content-length" */
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[66])
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[67])
/* "content-location" */
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[67])
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[68])
/* "content-range" */
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[68])
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[69])
/* "cookie" */
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[69])
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[70])
/* "date" */
#define GRPC_MDSTR_DATE (grpc_static_slice_table()[70])
#define GRPC_MDSTR_DATE (grpc_static_slice_table()[71])
/* "etag" */
#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[71])
#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[72])
/* "expect" */
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[72])
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[73])
/* "expires" */
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[73])
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[74])
/* "from" */
#define GRPC_MDSTR_FROM (grpc_static_slice_table()[74])
#define GRPC_MDSTR_FROM (grpc_static_slice_table()[75])
/* "if-match" */
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[75])
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[76])
/* "if-modified-since" */
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[76])
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[77])
/* "if-none-match" */
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[77])
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[78])
/* "if-range" */
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[78])
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[79])
/* "if-unmodified-since" */
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[79])
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[80])
/* "last-modified" */
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[80])
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[81])
/* "link" */
#define GRPC_MDSTR_LINK (grpc_static_slice_table()[81])
#define GRPC_MDSTR_LINK (grpc_static_slice_table()[82])
/* "location" */
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[82])
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[83])
/* "max-forwards" */
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[83])
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[84])
/* "proxy-authenticate" */
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[84])
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[85])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[85])
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[86])
/* "range" */
#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[86])
#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[87])
/* "referer" */
#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[87])
#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[88])
/* "refresh" */
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[88])
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[89])
/* "retry-after" */
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[89])
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[90])
/* "server" */
#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[90])
#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[91])
/* "set-cookie" */
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[91])
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[92])
/* "strict-transport-security" */
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[92])
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[93])
/* "transfer-encoding" */
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[93])
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[94])
/* "vary" */
#define GRPC_MDSTR_VARY (grpc_static_slice_table()[94])
#define GRPC_MDSTR_VARY (grpc_static_slice_table()[95])
/* "via" */
#define GRPC_MDSTR_VIA (grpc_static_slice_table()[95])
#define GRPC_MDSTR_VIA (grpc_static_slice_table()[96])
/* "www-authenticate" */
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[96])
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[97])
/* "0" */
#define GRPC_MDSTR_0 (grpc_static_slice_table()[97])
#define GRPC_MDSTR_0 (grpc_static_slice_table()[98])
/* "identity" */
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[98])
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[99])
/* "trailers" */
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[99])
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[100])
/* "application/grpc" */
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[100])
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[101])
/* "grpc" */
#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[101])
#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[102])
/* "PUT" */
#define GRPC_MDSTR_PUT (grpc_static_slice_table()[102])
#define GRPC_MDSTR_PUT (grpc_static_slice_table()[103])
/* "lb-cost-bin" */
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[103])
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[104])
/* "identity,deflate" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[104])
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[105])
/* "identity,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[105])
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[106])
/* "deflate,gzip" */
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[106])
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[107])
/* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(grpc_static_slice_table()[107])
(grpc_static_slice_table()[108])
namespace grpc_core {
struct StaticSliceRefcount;
@ -538,6 +540,7 @@ typedef enum {
GRPC_BATCH_HOST,
GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS,
GRPC_BATCH_GRPC_RETRY_PUSHBACK_MS,
GRPC_BATCH_X_ENDPOINT_LOAD_METRICS_BIN,
GRPC_BATCH_CALLOUTS_COUNT
} grpc_metadata_batch_callouts_index;
@ -567,6 +570,7 @@ typedef union {
struct grpc_linked_mdelem* host;
struct grpc_linked_mdelem* grpc_previous_rpc_attempts;
struct grpc_linked_mdelem* grpc_retry_pushback_ms;
struct grpc_linked_mdelem* x_endpoint_load_metrics_bin;
} named;
} grpc_metadata_batch_callouts;

@ -251,7 +251,14 @@ static void on_handshaker_service_resp_recv(void* arg, grpc_error* error) {
gpr_log(GPR_ERROR, "ALTS handshaker client is nullptr");
return;
}
alts_handshaker_client_handle_response(client, true);
bool success = true;
if (error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR,
"ALTS handshaker on_handshaker_service_resp_recv error: %s",
grpc_error_string(error));
success = false;
}
alts_handshaker_client_handle_response(client, success);
}
/* gRPC provided callback used when dedicatd CQ and thread are used.

@ -38,7 +38,7 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelImpl(
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args) {
grpc::GrpcLibraryCodegen
init_lib; // We need to call init in case of a bad creds.
init_lib; // We need to call init in case of bad creds.
return creds ? creds->CreateChannelImpl(target, args)
: grpc::CreateChannelInternal(
"",
@ -69,6 +69,8 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
std::vector<
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
grpc::GrpcLibraryCodegen
init_lib; // We need to call init in case of bad creds.
return creds ? creds->CreateChannelWithInterceptors(
target, args, std::move(interceptor_creators))
: grpc::CreateChannelInternal(

@ -46,7 +46,11 @@ class AuthMetadataProcessorAyncWrapper final {
AuthMetadataProcessorAyncWrapper(
const std::shared_ptr<AuthMetadataProcessor>& processor)
: thread_pool_(CreateDefaultThreadPool()), processor_(processor) {}
: processor_(processor) {
if (processor && processor->IsBlocking()) {
thread_pool_.reset(CreateDefaultThreadPool());
}
}
private:
void InvokeProcessor(grpc_auth_context* context, const grpc_metadata* md,

@ -1,63 +0,0 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System;
using Grpc.Core.Internal;
using Grpc.Core.Utils;
namespace Grpc.Core
{
/// <summary>
/// Base class for lightweight client-side stubs.
/// All calls are invoked via a <c>CallInvoker</c>.
/// Lite client stubs have no configuration knobs, all configuration
/// is provided by decorating the call invoker.
/// Note: experimental API that can change or be removed without any prior notice.
/// </summary>
public abstract class LiteClientBase
{
readonly CallInvoker callInvoker;
/// <summary>
/// Initializes a new instance of <c>LiteClientBase</c> class that
/// throws <c>NotImplementedException</c> upon invocation of any RPC.
/// This constructor is only provided to allow creation of test doubles
/// for client classes (e.g. mocking requires a parameterless constructor).
/// </summary>
protected LiteClientBase() : this(new UnimplementedCallInvoker())
{
}
/// <summary>
/// Initializes a new instance of <c>ClientBase</c> class.
/// </summary>
/// <param name="callInvoker">The <c>CallInvoker</c> for remote call invocation.</param>
public LiteClientBase(CallInvoker callInvoker)
{
this.callInvoker = GrpcPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
}
/// <summary>
/// Gets the call invoker.
/// </summary>
protected CallInvoker CallInvoker
{
get { return this.callInvoker; }
}
}
}

@ -17,6 +17,7 @@
#endregion
using System;
using System.Buffers;
namespace Grpc.Core
{
@ -27,7 +28,7 @@ namespace Grpc.Core
{
/// <summary>
/// Use the byte array as serialized form of current message and mark serialization process as complete.
/// Complete() can only be called once. By calling this method the caller gives up the ownership of the
/// <c>Complete(byte[])</c> can only be called once. By calling this method the caller gives up the ownership of the
/// payload which must not be accessed afterwards.
/// </summary>
/// <param name="payload">the serialized form of current message</param>
@ -35,5 +36,23 @@ namespace Grpc.Core
{
throw new NotImplementedException();
}
/// <summary>
/// Gets buffer writer that can be used to write the serialized data. Once serialization is finished,
/// <c>Complete()</c> needs to be called.
/// </summary>
public virtual IBufferWriter<byte> GetBufferWriter()
{
throw new NotImplementedException();
}
/// <summary>
/// Complete the payload written to the buffer writer. <c>Complete()</c> can only be called once.
/// </summary>
public virtual void Complete()
{
throw new NotImplementedException();
}
}
}

@ -52,6 +52,8 @@ namespace Grpc.Core.Tests
}
if (str == "SERIALIZE_TO_NULL")
{
// for contextual marshaller, serializing to null payload corresponds
// to not calling the Complete() method in the serializer.
return;
}
var bytes = System.Text.Encoding.UTF8.GetBytes(str);

@ -0,0 +1,207 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System;
using Grpc.Core;
using Grpc.Core.Internal;
using Grpc.Core.Utils;
using NUnit.Framework;
namespace Grpc.Core.Internal.Tests
{
public class DefaultSerializationContextTest
{
[TestCase]
public void CompleteAllowedOnlyOnce()
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
var buffer = GetTestBuffer(10);
context.Complete(buffer);
Assert.Throws(typeof(InvalidOperationException), () => context.Complete(buffer));
Assert.Throws(typeof(InvalidOperationException), () => context.Complete());
}
}
[TestCase]
public void CompleteAllowedOnlyOnce2()
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
context.Complete();
Assert.Throws(typeof(InvalidOperationException), () => context.Complete(GetTestBuffer(10)));
Assert.Throws(typeof(InvalidOperationException), () => context.Complete());
}
}
[TestCase(0)]
[TestCase(1)]
[TestCase(10)]
[TestCase(100)]
[TestCase(1000)]
public void ByteArrayPayload(int payloadSize)
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
var origPayload = GetTestBuffer(payloadSize);
context.Complete(origPayload);
var nativePayload = context.GetPayload().ToByteArray();
CollectionAssert.AreEqual(origPayload, nativePayload);
}
}
[TestCase(0)]
[TestCase(1)]
[TestCase(10)]
[TestCase(100)]
[TestCase(1000)]
public void BufferWriter_OneSegment(int payloadSize)
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
var origPayload = GetTestBuffer(payloadSize);
var bufferWriter = context.GetBufferWriter();
origPayload.AsSpan().CopyTo(bufferWriter.GetSpan(payloadSize));
bufferWriter.Advance(payloadSize);
context.Complete();
var nativePayload = context.GetPayload().ToByteArray();
CollectionAssert.AreEqual(origPayload, nativePayload);
}
}
[TestCase(0)]
[TestCase(1)]
[TestCase(10)]
[TestCase(100)]
[TestCase(1000)]
public void BufferWriter_OneSegment_GetMemory(int payloadSize)
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
var origPayload = GetTestBuffer(payloadSize);
var bufferWriter = context.GetBufferWriter();
origPayload.AsSpan().CopyTo(bufferWriter.GetMemory(payloadSize).Span);
bufferWriter.Advance(payloadSize);
context.Complete();
var nativePayload = context.GetPayload().ToByteArray();
CollectionAssert.AreEqual(origPayload, nativePayload);
}
}
[TestCase(1, 4)] // small slice size tests grpc_slice with inline data
[TestCase(10, 4)]
[TestCase(100, 4)]
[TestCase(1000, 4)]
[TestCase(1, 64)] // larger slice size tests allocated grpc_slices
[TestCase(10, 64)]
[TestCase(1000, 50)]
[TestCase(1000, 64)]
public void BufferWriter_MultipleSegments(int payloadSize, int maxSliceSize)
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
var origPayload = GetTestBuffer(payloadSize);
var bufferWriter = context.GetBufferWriter();
for (int offset = 0; offset < payloadSize; offset += maxSliceSize)
{
var sliceSize = Math.Min(maxSliceSize, payloadSize - offset);
// we allocate last slice as too big intentionally to test that shrinking works
var dest = bufferWriter.GetSpan(maxSliceSize);
origPayload.AsSpan(offset, sliceSize).CopyTo(dest);
bufferWriter.Advance(sliceSize);
}
context.Complete();
var nativePayload = context.GetPayload().ToByteArray();
CollectionAssert.AreEqual(origPayload, nativePayload);
}
}
[TestCase]
public void ContextIsReusable()
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
Assert.Throws(typeof(NullReferenceException), () => context.GetPayload());
var origPayload1 = GetTestBuffer(10);
context.Complete(origPayload1);
CollectionAssert.AreEqual(origPayload1, context.GetPayload().ToByteArray());
context.Reset();
var origPayload2 = GetTestBuffer(20);
var bufferWriter = context.GetBufferWriter();
origPayload2.AsSpan().CopyTo(bufferWriter.GetMemory(origPayload2.Length).Span);
bufferWriter.Advance(origPayload2.Length);
context.Complete();
CollectionAssert.AreEqual(origPayload2, context.GetPayload().ToByteArray());
context.Reset();
Assert.Throws(typeof(NullReferenceException), () => context.GetPayload());
}
}
[TestCase]
public void GetBufferWriterThrowsForCompletedContext()
{
using (var scope = NewDefaultSerializationContextScope())
{
var context = scope.Context;
context.Complete(GetTestBuffer(10));
Assert.Throws(typeof(InvalidOperationException), () => context.GetBufferWriter());
}
}
private DefaultSerializationContext.UsageScope NewDefaultSerializationContextScope()
{
return new DefaultSerializationContext.UsageScope(new DefaultSerializationContext());
}
private byte[] GetTestBuffer(int length)
{
var testBuffer = new byte[length];
for (int i = 0; i < testBuffer.Length; i++)
{
testBuffer[i] = (byte) i;
}
return testBuffer;
}
}
}

@ -101,13 +101,13 @@ namespace Grpc.Core.Internal.Tests
return "PEER";
}
public void StartUnary(IUnaryResponseClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
public void StartUnary(IUnaryResponseClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
{
StartCallMaybeFail();
UnaryResponseClientCallback = callback;
}
public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
public void StartUnary(BatchContextSafeHandle ctx, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
{
StartCallMaybeFail();
throw new NotImplementedException();
@ -119,7 +119,7 @@ namespace Grpc.Core.Internal.Tests
UnaryResponseClientCallback = callback;
}
public void StartServerStreaming(IReceivedStatusOnClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
public void StartServerStreaming(IReceivedStatusOnClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags)
{
StartCallMaybeFail();
ReceivedStatusOnClientCallback = callback;
@ -146,7 +146,7 @@ namespace Grpc.Core.Internal.Tests
SendCompletionCallback = callback;
}
public void StartSendMessage(ISendCompletionCallback callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata)
public void StartSendMessage(ISendCompletionCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata)
{
SendCompletionCallback = callback;
}
@ -157,7 +157,7 @@ namespace Grpc.Core.Internal.Tests
}
public void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata,
byte[] optionalPayload, WriteFlags writeFlags)
SliceBufferSafeHandle payload, WriteFlags writeFlags)
{
SendStatusFromServerCallback = callback;
}

@ -0,0 +1,163 @@
#region Copyright notice and license
// Copyright 2019 The gRPC Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System;
using Grpc.Core;
using Grpc.Core.Internal;
using Grpc.Core.Utils;
using NUnit.Framework;
namespace Grpc.Core.Internal.Tests
{
public class SliceBufferSafeHandleTest
{
[TestCase]
public void Complete_EmptyBuffer()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
sliceBuffer.Complete();
CollectionAssert.AreEqual(new byte[0], sliceBuffer.ToByteArray());
}
}
[TestCase]
public void Complete_TailSizeZero()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
var origPayload = GetTestBuffer(10);
origPayload.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload.Length));
sliceBuffer.Advance(origPayload.Length);
// call complete where tail space size == 0
sliceBuffer.Complete();
CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray());
}
}
[TestCase]
public void Complete_TruncateTailSpace()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
var origPayload = GetTestBuffer(10);
var dest = sliceBuffer.GetSpan(origPayload.Length + 10);
origPayload.AsSpan().CopyTo(dest);
sliceBuffer.Advance(origPayload.Length);
// call complete where tail space needs to be truncated
sliceBuffer.Complete();
CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray());
}
}
[TestCase]
public void SliceBufferIsReusable()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
var origPayload = GetTestBuffer(10);
origPayload.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload.Length));
sliceBuffer.Advance(origPayload.Length);
sliceBuffer.Complete();
CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray());
sliceBuffer.Reset();
var origPayload2 = GetTestBuffer(20);
origPayload2.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload2.Length));
sliceBuffer.Advance(origPayload2.Length);
sliceBuffer.Complete();
CollectionAssert.AreEqual(origPayload2, sliceBuffer.ToByteArray());
sliceBuffer.Reset();
CollectionAssert.AreEqual(new byte[0], sliceBuffer.ToByteArray());
}
}
[TestCase]
public void SliceBuffer_SizeHintZero()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
var destSpan = sliceBuffer.GetSpan(0);
Assert.IsTrue(destSpan.Length > 0); // some non-zero size memory is made available
sliceBuffer.Reset();
var destMemory = sliceBuffer.GetMemory(0);
Assert.IsTrue(destMemory.Length > 0);
}
}
[TestCase(0)]
[TestCase(1000)]
public void SliceBuffer_BigPayload(int sizeHint)
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
var bigPayload = GetTestBuffer(4 * 1024 * 1024);
int offset = 0;
while (offset < bigPayload.Length)
{
var destSpan = sliceBuffer.GetSpan(sizeHint);
int copySize = Math.Min(destSpan.Length, bigPayload.Length - offset);
bigPayload.AsSpan(offset, copySize).CopyTo(destSpan);
sliceBuffer.Advance(copySize);
offset += copySize;
}
sliceBuffer.Complete();
CollectionAssert.AreEqual(bigPayload, sliceBuffer.ToByteArray());
}
}
[TestCase]
public void SliceBuffer_NegativeSizeHint()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
Assert.Throws(typeof(ArgumentException), () => sliceBuffer.GetSpan(-1));
Assert.Throws(typeof(ArgumentException), () => sliceBuffer.GetMemory(-1));
}
}
[TestCase]
public void SliceBuffer_AdvanceBadArg()
{
using (var sliceBuffer = SliceBufferSafeHandle.Create())
{
int size = 10;
var destSpan = sliceBuffer.GetSpan(size);
Assert.Throws(typeof(ArgumentException), () => sliceBuffer.Advance(size + 1));
Assert.Throws(typeof(ArgumentException), () => sliceBuffer.Advance(-1));
}
}
private byte[] GetTestBuffer(int length)
{
var testBuffer = new byte[length];
for (int i = 0; i < testBuffer.Length; i++)
{
testBuffer[i] = (byte) i;
}
return testBuffer;
}
}
}

@ -96,8 +96,7 @@ namespace Grpc.Core.Tests
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.MinValue)), "abc"));
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode);
}
[Test]
@ -110,8 +109,7 @@ namespace Grpc.Core.Tests
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSpan.FromSeconds(5)))), "abc"));
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode);
}
[Test]
@ -130,9 +128,7 @@ namespace Grpc.Core.Tests
});
var ex = Assert.Throws<RpcException>(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSpan.FromSeconds(5)))), "abc"));
// We can't guarantee the status code always DeadlineExceeded. See issue #2685.
Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal });
Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode);
Assert.IsTrue(await serverReceivedCancellationTcs.Task);
}
}

@ -95,10 +95,10 @@ namespace Grpc.Core.Internal
readingDone = true;
}
byte[] payload = UnsafeSerialize(msg);
using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope())
using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers))
{
var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array?
var ctx = details.Channel.Environment.BatchContextPool.Lease();
try
{
@ -160,13 +160,15 @@ namespace Grpc.Core.Internal
halfcloseRequested = true;
readingDone = true;
byte[] payload = UnsafeSerialize(msg);
unaryResponseTcs = new TaskCompletionSource<TResponse>();
using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers))
using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope())
{
call.StartUnary(UnaryResponseClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags);
callStartedOk = true;
var payload = UnsafeSerialize(msg, serializationScope.Context);
unaryResponseTcs = new TaskCompletionSource<TResponse>();
using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers))
{
call.StartUnary(UnaryResponseClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags);
callStartedOk = true;
}
}
return unaryResponseTcs.Task;
@ -235,13 +237,15 @@ namespace Grpc.Core.Internal
halfcloseRequested = true;
byte[] payload = UnsafeSerialize(msg);
streamingResponseCallFinishedTcs = new TaskCompletionSource<object>();
using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers))
using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope())
{
call.StartServerStreaming(ReceivedStatusOnClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags);
callStartedOk = true;
var payload = UnsafeSerialize(msg, serializationScope.Context);
streamingResponseCallFinishedTcs = new TaskCompletionSource<object>();
using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers))
{
call.StartServerStreaming(ReceivedStatusOnClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags);
callStartedOk = true;
}
}
call.StartReceiveInitialMetadata(ReceivedResponseHeadersCallback);
}

@ -115,23 +115,25 @@ namespace Grpc.Core.Internal
/// </summary>
protected Task SendMessageInternalAsync(TWrite msg, WriteFlags writeFlags)
{
byte[] payload = UnsafeSerialize(msg);
lock (myLock)
using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope())
{
GrpcPreconditions.CheckState(started);
var earlyResult = CheckSendAllowedOrEarlyResult();
if (earlyResult != null)
var payload = UnsafeSerialize(msg, serializationScope.Context);
lock (myLock)
{
return earlyResult;
}
GrpcPreconditions.CheckState(started);
var earlyResult = CheckSendAllowedOrEarlyResult();
if (earlyResult != null)
{
return earlyResult;
}
call.StartSendMessage(SendCompletionCallback, payload, writeFlags, !initialMetadataSent);
call.StartSendMessage(SendCompletionCallback, payload, writeFlags, !initialMetadataSent);
initialMetadataSent = true;
streamingWritesCounter++;
streamingWriteTcs = new TaskCompletionSource<object>();
return streamingWriteTcs.Task;
initialMetadataSent = true;
streamingWritesCounter++;
streamingWriteTcs = new TaskCompletionSource<object>();
return streamingWriteTcs.Task;
}
}
}
@ -213,19 +215,11 @@ namespace Grpc.Core.Internal
/// </summary>
protected abstract Task CheckSendAllowedOrEarlyResult();
protected byte[] UnsafeSerialize(TWrite msg)
// runs the serializer, propagating any exceptions being thrown without modifying them
protected SliceBufferSafeHandle UnsafeSerialize(TWrite msg, DefaultSerializationContext context)
{
DefaultSerializationContext context = null;
try
{
context = DefaultSerializationContext.GetInitializedThreadLocal();
serializer(msg, context);
return context.GetPayload();
}
finally
{
context?.Reset();
}
serializer(msg, context);
return context.GetPayload();
}
protected Exception TryDeserialize(IBufferReader reader, out TRead msg)

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

Loading…
Cancel
Save