Merge pull request #18745 from AspirinSJL/xds_to_lb

Use EDS in xDS policy
pull/19891/head
Juanli Shen 5 years ago committed by GitHub
commit fb21394c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 152
      BUILD
  2. 52
      BUILD.gn
  3. 65
      CMakeLists.txt
  4. 80
      Makefile
  5. 93
      build.yaml
  6. 40
      config.m4
  7. 49
      config.w32
  8. 26
      gRPC-C++.podspec
  9. 78
      gRPC-Core.podspec
  10. 52
      grpc.gemspec
  11. 55
      grpc.gyp
  12. 52
      package.xml
  13. 19
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
  14. 54
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h
  15. 19
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
  16. 54
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h
  17. 89
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
  18. 164
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
  19. 438
      src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
  20. 463
      src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
  21. 143
      src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h
  22. 607
      src/core/lib/transport/static_metadata.cc
  23. 149
      src/core/lib/transport/static_metadata.h
  24. 31
      src/proto/grpc/lb/v2/BUILD
  25. 553
      src/proto/grpc/lb/v2/xds_for_test.proto
  26. 26
      src/python/grpcio/grpc_core_dependencies.py
  27. 1
      test/core/end2end/fuzzers/hpack.dictionary
  28. 8
      test/cpp/end2end/BUILD
  29. 141
      test/cpp/end2end/xds_end2end_test.cc
  30. 1
      tools/codegen/core/gen_static_metadata.py
  31. 26
      tools/distrib/check_nanopb_output.sh
  32. 52
      tools/doxygen/Doxyfile.core.internal
  33. 176
      tools/run_tests/generated/sources_and_headers.json

152
BUILD

@ -1192,24 +1192,6 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "grpclb_proto",
srcs = [
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
],
hdrs = [
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
],
external_deps = [
"nanopb",
],
language = "c++",
)
grpc_cc_library(
name = "grpc_lb_policy_grpclb",
srcs = [
@ -1230,8 +1212,8 @@ grpc_cc_library(
deps = [
"grpc_base",
"grpc_client_channel",
"grpc_resolver_fake",
"grpc_lb_upb",
"grpc_resolver_fake",
],
)
@ -1255,9 +1237,9 @@ grpc_cc_library(
deps = [
"grpc_base",
"grpc_client_channel",
"grpc_lb_upb",
"grpc_resolver_fake",
"grpc_secure",
"grpc_lb_upb",
],
)
@ -1280,10 +1262,11 @@ grpc_cc_library(
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
"grpc_lb_upb",
"grpc_resolver_fake",
"grpclb_proto",
],
)
@ -1306,11 +1289,12 @@ grpc_cc_library(
],
language = "c++",
deps = [
"envoy_ads_upb",
"grpc_base",
"grpc_client_channel",
"grpc_lb_upb",
"grpc_resolver_fake",
"grpc_secure",
"grpclb_proto",
],
)
@ -1979,8 +1963,8 @@ grpc_cc_library(
language = "c++",
public_hdrs = GRPCXX_PUBLIC_HDRS,
deps = [
"grpc++_codegen_base",
"grpc",
"grpc++_codegen_base",
"grpc_health_upb",
],
)
@ -1993,8 +1977,8 @@ grpc_cc_library(
public_hdrs = GRPCXX_PUBLIC_HDRS,
deps = [
"grpc++_codegen_base",
"grpc_unsecure",
"grpc_health_upb",
"grpc_unsecure",
],
)
@ -2256,7 +2240,9 @@ grpc_cc_library(
],
)
# Once upb code-gen issue is resolved, use this.
# Once upb code-gen issue is resolved, use the targets commented below to replace the ones using
# upb-generated files.
# grpc_upb_proto_library(
# name = "upb_load_report",
# deps = ["@envoy_api//envoy/api/v2/endpoint:load_report_export"],
@ -2297,6 +2283,112 @@ grpc_cc_library(
# ],
# )
grpc_cc_library(
name = "envoy_ads_upb",
srcs = [
"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/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",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c",
],
hdrs = [
"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/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",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h",
],
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":envoy_core_upb",
":envoy_type_upb",
":google_api_upb",
":proto_gen_validate_upb",
],
)
grpc_cc_library(
name = "envoy_core_upb",
srcs = [
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c",
"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/protocol.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h",
"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/protocol.upb.h",
],
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":envoy_type_upb",
":google_api_upb",
":proto_gen_validate_upb",
],
)
grpc_cc_library(
name = "envoy_type_upb",
srcs = [
"src/core/ext/upb-generated/envoy/type/percent.upb.c",
"src/core/ext/upb-generated/envoy/type/range.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/envoy/type/percent.upb.h",
"src/core/ext/upb-generated/envoy/type/range.upb.h",
],
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":google_api_upb",
":proto_gen_validate_upb",
],
)
grpc_cc_library(
name = "proto_gen_validate_upb",
srcs = [
"src/core/ext/upb-generated/gogoproto/gogo.upb.c",
"src/core/ext/upb-generated/validate/validate.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/gogoproto/gogo.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.h",
],
external_deps = [
"upb_lib",
],
language = "c++",
deps = [
":google_api_upb",
],
)
# Once upb code-gen issue is resolved, replace grpc_health_upb with this.
# grpc_upb_proto_library(
# name = "grpc_health_upb",
@ -2321,22 +2413,28 @@ grpc_cc_library(
grpc_cc_library(
name = "google_api_upb",
srcs = [
"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/duration.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",
],
hdrs = [
"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/duration.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",
],
external_deps = [
"upb_lib",

@ -263,12 +263,6 @@ config("grpc_config") {
"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.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h",
"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/lb_policy/subchannel_list.h",
@ -410,6 +404,48 @@ config("grpc_config") {
"src/core/ext/transport/inproc/inproc_plugin.cc",
"src/core/ext/transport/inproc/inproc_transport.cc",
"src/core/ext/transport/inproc/inproc_transport.h",
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.c",
"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/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",
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c",
"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.c",
"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/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",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h",
"src/core/ext/upb-generated/envoy/type/percent.upb.c",
"src/core/ext/upb-generated/envoy/type/percent.upb.h",
"src/core/ext/upb-generated/envoy/type/range.upb.c",
"src/core/ext/upb-generated/envoy/type/range.upb.h",
"src/core/ext/upb-generated/gogoproto/gogo.upb.c",
"src/core/ext/upb-generated/gogoproto/gogo.upb.h",
"src/core/ext/upb-generated/google/api/annotations.upb.c",
"src/core/ext/upb-generated/google/api/annotations.upb.h",
"src/core/ext/upb-generated/google/api/http.upb.c",
"src/core/ext/upb-generated/google/api/http.upb.h",
"src/core/ext/upb-generated/google/protobuf/any.upb.c",
"src/core/ext/upb-generated/google/protobuf/any.upb.h",
"src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
@ -424,10 +460,14 @@ config("grpc_config") {
"src/core/ext/upb-generated/google/protobuf/timestamp.upb.h",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.c",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.h",
"src/core/ext/upb-generated/google/rpc/status.upb.c",
"src/core/ext/upb-generated/google/rpc/status.upb.h",
"src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c",
"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/validate/validate.upb.c",
"src/core/ext/upb-generated/validate/validate.upb.h",
"src/core/lib/avl/avl.cc",
"src/core/lib/avl/avl.h",
"src/core/lib/backoff/backoff.cc",

@ -1323,6 +1323,8 @@ add_library(grpc
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
@ -1330,14 +1332,32 @@ add_library(grpc
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
src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
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/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
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c
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/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
@ -2804,6 +2824,8 @@ add_library(grpc_unsecure
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
@ -2811,16 +2833,31 @@ add_library(grpc_unsecure
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
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
third_party/nanopb/pb_common.c
third_party/nanopb/pb_decode.c
third_party/nanopb/pb_encode.c
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/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
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c
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/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
@ -17689,17 +17726,17 @@ endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(xds_end2end_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v1/load_balancer.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v1/load_balancer.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v1/load_balancer.grpc.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/xds_for_test.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/xds_for_test.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.h
test/cpp/end2end/xds_end2end_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
protobuf_generate_grpc_cpp(
src/proto/grpc/lb/v1/load_balancer.proto
src/proto/grpc/lb/v2/xds_for_test.proto
)
target_include_directories(xds_end2end_test

@ -2704,6 +2704,22 @@ $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/lo
$(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $<
endif
ifeq ($(NO_PROTOC),true)
$(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.cc: protoc_dep_error
else
$(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.pb.cc: src/proto/grpc/lb/v2/xds_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS)
$(E) "[PROTOC] Generating protobuf CC file from $<"
$(Q) mkdir -p `dirname $@`
$(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $<
$(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.cc: src/proto/grpc/lb/v2/xds_for_test.proto $(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS)
$(E) "[GRPC] Generating gRPC's protobuf service CC file from $<"
$(Q) mkdir -p `dirname $@`
$(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $<
endif
ifeq ($(NO_PROTOC),true)
$(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc: protoc_dep_error
@ -3814,6 +3830,8 @@ LIBGRPC_SRC = \
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 \
@ -3821,14 +3839,32 @@ LIBGRPC_SRC = \
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 \
src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
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/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 \
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \
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/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 \
@ -5219,6 +5255,8 @@ LIBGRPC_UNSECURE_SRC = \
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 \
@ -5226,16 +5264,31 @@ LIBGRPC_UNSECURE_SRC = \
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 \
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
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/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 \
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \
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/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 \
@ -19749,7 +19802,7 @@ endif
XDS_END2END_TEST_SRC = \
$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.pb.cc $(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.cc \
test/cpp/end2end/xds_end2end_test.cc \
XDS_END2END_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(XDS_END2END_TEST_SRC))))
@ -19781,7 +19834,7 @@ endif
endif
$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v1/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v2/xds_for_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a
@ -19792,7 +19845,7 @@ ifneq ($(NO_DEPS),true)
-include $(XDS_END2END_TEST_OBJS:.o=.dep)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.pb.cc $(GENDIR)/src/proto/grpc/lb/v2/xds_for_test.grpc.pb.cc
PUBLIC_HEADERS_MUST_BE_C89_SRC = \
@ -22567,6 +22620,9 @@ test/cpp/util/string_ref_helper.cc: $(OPENSSL_DEP)
test/cpp/util/subprocess.cc: $(OPENSSL_DEP)
test/cpp/util/test_config_cc.cc: $(OPENSSL_DEP)
test/cpp/util/test_credentials_provider.cc: $(OPENSSL_DEP)
third_party/nanopb/pb_common.c: $(OPENSSL_DEP)
third_party/nanopb/pb_decode.c: $(OPENSSL_DEP)
third_party/nanopb/pb_encode.c: $(OPENSSL_DEP)
endif
.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx dep_c dep_cxx bins_dep_c bins_dep_cxx clean

@ -122,8 +122,67 @@ filegroups:
- test/core/util/cmdline.cc
uses:
- gpr_base_headers
- name: envoy_ads_upb
headers:
- 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/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
- src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h
- src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h
- src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h
- src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h
src:
- 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/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
- src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c
- src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c
- src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c
- src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c
uses:
- envoy_core_upb
- envoy_type_upb
- google_api_upb
- proto_gen_validate_upb
- name: envoy_core_upb
headers:
- src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h
- src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h
- 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/protocol.upb.h
src:
- src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c
- src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c
- 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/protocol.upb.c
uses:
- envoy_type_upb
- google_api_upb
- proto_gen_validate_upb
- name: envoy_type_upb
headers:
- src/core/ext/upb-generated/envoy/type/percent.upb.h
- src/core/ext/upb-generated/envoy/type/range.upb.h
src:
- src/core/ext/upb-generated/envoy/type/percent.upb.c
- src/core/ext/upb-generated/envoy/type/range.upb.c
uses:
- google_api_upb
- proto_gen_validate_upb
- name: google_api_upb
headers:
- 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
@ -131,7 +190,10 @@ filegroups:
- 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:
- 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
@ -139,6 +201,7 @@ filegroups:
- 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
- name: gpr_base
src:
- src/core/lib/gpr/alloc.cc
@ -778,11 +841,11 @@ filegroups:
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
plugin: grpc_lb_policy_xds
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- grpc_resolver_fake
- grpclb_proto
- nanopb
- grpc_lb_upb
- name: grpc_lb_policy_xds_secure
headers:
- src/core/ext/filters/client_channel/lb_policy/xds/xds.h
@ -796,12 +859,12 @@ filegroups:
- src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc
plugin: grpc_lb_policy_xds
uses:
- envoy_ads_upb
- grpc_base
- grpc_client_channel
- grpc_resolver_fake
- grpc_secure
- grpclb_proto
- nanopb
- grpc_lb_upb
- name: grpc_lb_subchannel_list
headers:
- src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
@ -1194,17 +1257,6 @@ filegroups:
uses:
- grpc_base
- grpc_server_backward_compatibility
- name: grpclb_proto
headers:
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
src:
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
uses:
- nanopb
- name: nanopb
src:
- third_party/nanopb/pb_common.c
@ -1218,6 +1270,15 @@ filegroups:
- third_party/nanopb/pb_common.h
- third_party/nanopb/pb_decode.h
- third_party/nanopb/pb_encode.h
- name: proto_gen_validate_upb
headers:
- src/core/ext/upb-generated/gogoproto/gogo.upb.h
- src/core/ext/upb-generated/validate/validate.upb.h
src:
- src/core/ext/upb-generated/gogoproto/gogo.upb.c
- src/core/ext/upb-generated/validate/validate.upb.c
uses:
- google_api_upb
- name: transport_security_test_lib
build: test
headers:
@ -5986,7 +6047,7 @@ targets:
build: test
language: c++
src:
- src/proto/grpc/lb/v1/load_balancer.proto
- src/proto/grpc/lb/v2/xds_for_test.proto
- test/cpp/end2end/xds_end2end_test.cc
deps:
- grpc++_test_util

@ -402,6 +402,8 @@ 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 \
@ -409,14 +411,32 @@ if test "$PHP_GRPC" != "no"; then
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 \
src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc \
src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
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/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 \
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \
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/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 \
@ -709,8 +729,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/health)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/pick_first)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/round_robin)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/xds)
@ -737,9 +755,21 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/inproc)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/auth)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/cluster)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/core)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/endpoint)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/service/discovery/v2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/service/load_stats/v2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/type)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/gogoproto)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/google/api)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/google/protobuf)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/google/rpc)
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/validate)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/avl)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel)

@ -375,6 +375,8 @@ 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 " +
@ -382,14 +384,32 @@ if (PHP_GRPC != "no") {
"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 " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_client_stats.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_load_balancer_api.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\google\\protobuf\\duration.pb.c " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\google\\protobuf\\timestamp.pb.c " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\load_balancer.pb.c " +
"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\\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 " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\load_report.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\service\\discovery\\v2\\ads.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\service\\load_stats\\v2\\lrs.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\address.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\base.upb.c " +
"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\\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 " +
@ -714,12 +734,6 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\health");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\google");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\google\\protobuf");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\xds");
@ -750,8 +764,24 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\transport");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\inproc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\discovery");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\discovery\\v2");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\load_stats");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\service\\load_stats\\v2");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\type");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\gogoproto");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google\\api");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google\\protobuf");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\google\\rpc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc");
@ -759,6 +789,7 @@ 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\\validate");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\avl");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\backoff");

@ -587,6 +587,8 @@ 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',
@ -594,13 +596,31 @@ Pod::Spec.new do |s|
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
'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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h',
'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/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',

@ -543,6 +543,8 @@ 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',
@ -550,13 +552,31 @@ Pod::Spec.new do |s|
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
'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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h',
'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/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',
@ -879,6 +899,8 @@ 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',
@ -886,14 +908,32 @@ Pod::Spec.new do |s|
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'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/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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c',
'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/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',
@ -1232,6 +1272,8 @@ 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',
@ -1239,13 +1281,31 @@ Pod::Spec.new do |s|
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h',
'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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h',
'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/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',

@ -476,6 +476,8 @@ 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 )
@ -483,13 +485,31 @@ Gem::Specification.new do |s|
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 )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h )
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 )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h )
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/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 )
@ -815,6 +835,8 @@ 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 )
@ -822,14 +844,32 @@ Gem::Specification.new do |s|
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 )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
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/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 )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c )
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/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 )

@ -612,6 +612,8 @@
'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',
@ -619,14 +621,32 @@
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'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/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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c',
'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/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',
@ -1425,6 +1445,8 @@
'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',
@ -1432,16 +1454,31 @@
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
'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/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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c',
'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/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',

@ -481,6 +481,8 @@
<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" />
@ -488,13 +490,31 @@
<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" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" role="src" />
<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/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" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h" role="src" />
<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/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" />
@ -820,6 +840,8 @@
<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" />
@ -827,14 +849,32 @@
<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" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" />
<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/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" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c" role="src" />
<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/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" />

@ -1,19 +0,0 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.7-dev */
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Duration_fields[3] = {
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_protobuf_Duration, seconds, seconds, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_protobuf_Duration, nanos, seconds, 0),
PB_LAST_FIELD
};
/* @@protoc_insertion_point(eof) */

@ -1,54 +0,0 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.7-dev */
#ifndef PB_GOOGLE_PROTOBUF_DURATION_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_DURATION_PB_H_INCLUDED
#include "pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Struct definitions */
typedef struct _google_protobuf_Duration {
bool has_seconds;
int64_t seconds;
bool has_nanos;
int32_t nanos;
/* @@protoc_insertion_point(struct:google_protobuf_Duration) */
} google_protobuf_Duration;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Duration_init_default {false, 0, false, 0}
#define google_protobuf_Duration_init_zero {false, 0, false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_Duration_seconds_tag 1
#define google_protobuf_Duration_nanos_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Duration_fields[3];
/* Maximum encoded size of messages (where known) */
#define google_protobuf_Duration_size 22
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define DURATION_MESSAGES \
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */
#endif

@ -1,19 +0,0 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.7-dev */
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_protobuf_Timestamp_fields[3] = {
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_protobuf_Timestamp, seconds, seconds, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_protobuf_Timestamp, nanos, seconds, 0),
PB_LAST_FIELD
};
/* @@protoc_insertion_point(eof) */

@ -1,54 +0,0 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.7-dev */
#ifndef PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED
#include "pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Struct definitions */
typedef struct _google_protobuf_Timestamp {
bool has_seconds;
int64_t seconds;
bool has_nanos;
int32_t nanos;
/* @@protoc_insertion_point(struct:google_protobuf_Timestamp) */
} google_protobuf_Timestamp;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_protobuf_Timestamp_init_default {false, 0, false, 0}
#define google_protobuf_Timestamp_init_zero {false, 0, false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_Timestamp_seconds_tag 1
#define google_protobuf_Timestamp_nanos_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Timestamp_fields[3];
/* Maximum encoded size of messages (where known) */
#define google_protobuf_Timestamp_size 22
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define TIMESTAMP_MESSAGES \
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */
#endif

@ -1,89 +0,0 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.7-dev */
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t grpc_lb_v1_LoadBalanceRequest_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_LoadBalanceRequest, initial_request, initial_request, &grpc_lb_v1_InitialLoadBalanceRequest_fields),
PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_LoadBalanceRequest, client_stats, initial_request, &grpc_lb_v1_ClientStats_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2] = {
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceRequest, name, name, 0),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_ClientStatsPerToken_fields[3] = {
PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_lb_v1_ClientStatsPerToken, load_balance_token, load_balance_token, 0),
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStatsPerToken, num_calls, load_balance_token, 0),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_ClientStats_fields[7] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_ClientStats, timestamp, timestamp, &google_protobuf_Timestamp_fields),
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_started, timestamp, 0),
PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished, num_calls_started, 0),
PB_FIELD( 6, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_with_client_failed_to_send, num_calls_finished, 0),
PB_FIELD( 7, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_known_received, num_calls_finished_with_client_failed_to_send, 0),
PB_FIELD( 8, MESSAGE , REPEATED, CALLBACK, OTHER, grpc_lb_v1_ClientStats, calls_finished_with_drop, num_calls_finished_known_received, &grpc_lb_v1_ClientStatsPerToken_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_LoadBalanceResponse, initial_response, initial_response, &grpc_lb_v1_InitialLoadBalanceResponse_fields),
PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_LoadBalanceResponse, server_list, initial_response, &grpc_lb_v1_ServerList_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3] = {
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceResponse, load_balancer_delegate, load_balancer_delegate, 0),
PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &google_protobuf_Duration_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_ServerList_fields[2] = {
PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, grpc_lb_v1_ServerList, servers, servers, &grpc_lb_v1_Server_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v1_Server_fields[5] = {
PB_FIELD( 1, BYTES , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Server, ip_address, ip_address, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, port, ip_address, 0),
PB_FIELD( 3, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, load_balance_token, port, 0),
PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop, load_balance_token, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 65536 && pb_membersize(grpc_lb_v1_ClientStats, calls_finished_with_drop) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v1_ServerList, servers) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStatsPerToken_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 256 && pb_membersize(grpc_lb_v1_ClientStats, calls_finished_with_drop) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStatsPerToken_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server)
#endif
/* @@protoc_insertion_point(eof) */

@ -1,164 +0,0 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.7-dev */
#ifndef PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
#define PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
#include "pb.h"
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h"
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Struct definitions */
typedef struct _grpc_lb_v1_ServerList {
pb_callback_t servers;
/* @@protoc_insertion_point(struct:grpc_lb_v1_ServerList) */
} grpc_lb_v1_ServerList;
typedef struct _grpc_lb_v1_ClientStats {
bool has_timestamp;
google_protobuf_Timestamp timestamp;
bool has_num_calls_started;
int64_t num_calls_started;
bool has_num_calls_finished;
int64_t num_calls_finished;
bool has_num_calls_finished_with_client_failed_to_send;
int64_t num_calls_finished_with_client_failed_to_send;
bool has_num_calls_finished_known_received;
int64_t num_calls_finished_known_received;
pb_callback_t calls_finished_with_drop;
/* @@protoc_insertion_point(struct:grpc_lb_v1_ClientStats) */
} grpc_lb_v1_ClientStats;
typedef struct _grpc_lb_v1_ClientStatsPerToken {
pb_callback_t load_balance_token;
bool has_num_calls;
int64_t num_calls;
/* @@protoc_insertion_point(struct:grpc_lb_v1_ClientStatsPerToken) */
} grpc_lb_v1_ClientStatsPerToken;
typedef struct _grpc_lb_v1_InitialLoadBalanceRequest {
bool has_name;
char name[128];
/* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceRequest) */
} grpc_lb_v1_InitialLoadBalanceRequest;
typedef struct _grpc_lb_v1_InitialLoadBalanceResponse {
bool has_load_balancer_delegate;
char load_balancer_delegate[64];
bool has_client_stats_report_interval;
google_protobuf_Duration client_stats_report_interval;
/* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceResponse) */
} grpc_lb_v1_InitialLoadBalanceResponse;
typedef PB_BYTES_ARRAY_T(16) grpc_lb_v1_Server_ip_address_t;
typedef struct _grpc_lb_v1_Server {
bool has_ip_address;
grpc_lb_v1_Server_ip_address_t ip_address;
bool has_port;
int32_t port;
bool has_load_balance_token;
char load_balance_token[50];
bool has_drop;
bool drop;
/* @@protoc_insertion_point(struct:grpc_lb_v1_Server) */
} grpc_lb_v1_Server;
typedef struct _grpc_lb_v1_LoadBalanceRequest {
bool has_initial_request;
grpc_lb_v1_InitialLoadBalanceRequest initial_request;
bool has_client_stats;
grpc_lb_v1_ClientStats client_stats;
/* @@protoc_insertion_point(struct:grpc_lb_v1_LoadBalanceRequest) */
} grpc_lb_v1_LoadBalanceRequest;
typedef struct _grpc_lb_v1_LoadBalanceResponse {
bool has_initial_response;
grpc_lb_v1_InitialLoadBalanceResponse initial_response;
bool has_server_list;
grpc_lb_v1_ServerList server_list;
/* @@protoc_insertion_point(struct:grpc_lb_v1_LoadBalanceResponse) */
} grpc_lb_v1_LoadBalanceResponse;
/* Default values for struct fields */
/* Initializer values for message structs */
#define grpc_lb_v1_LoadBalanceRequest_init_default {false, grpc_lb_v1_InitialLoadBalanceRequest_init_default, false, grpc_lb_v1_ClientStats_init_default}
#define grpc_lb_v1_InitialLoadBalanceRequest_init_default {false, ""}
#define grpc_lb_v1_ClientStatsPerToken_init_default {{{NULL}, NULL}, false, 0}
#define grpc_lb_v1_ClientStats_init_default {false, google_protobuf_Timestamp_init_default, false, 0, false, 0, false, 0, false, 0, {{NULL}, NULL}}
#define grpc_lb_v1_LoadBalanceResponse_init_default {false, grpc_lb_v1_InitialLoadBalanceResponse_init_default, false, grpc_lb_v1_ServerList_init_default}
#define grpc_lb_v1_InitialLoadBalanceResponse_init_default {false, "", false, google_protobuf_Duration_init_default}
#define grpc_lb_v1_ServerList_init_default {{{NULL}, NULL}}
#define grpc_lb_v1_Server_init_default {false, {0, {0}}, false, 0, false, "", false, 0}
#define grpc_lb_v1_LoadBalanceRequest_init_zero {false, grpc_lb_v1_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v1_ClientStats_init_zero}
#define grpc_lb_v1_InitialLoadBalanceRequest_init_zero {false, ""}
#define grpc_lb_v1_ClientStatsPerToken_init_zero {{{NULL}, NULL}, false, 0}
#define grpc_lb_v1_ClientStats_init_zero {false, google_protobuf_Timestamp_init_zero, false, 0, false, 0, false, 0, false, 0, {{NULL}, NULL}}
#define grpc_lb_v1_LoadBalanceResponse_init_zero {false, grpc_lb_v1_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v1_ServerList_init_zero}
#define grpc_lb_v1_InitialLoadBalanceResponse_init_zero {false, "", false, google_protobuf_Duration_init_zero}
#define grpc_lb_v1_ServerList_init_zero {{{NULL}, NULL}}
#define grpc_lb_v1_Server_init_zero {false, {0, {0}}, false, 0, false, "", false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define grpc_lb_v1_ServerList_servers_tag 1
#define grpc_lb_v1_ClientStats_timestamp_tag 1
#define grpc_lb_v1_ClientStats_num_calls_started_tag 2
#define grpc_lb_v1_ClientStats_num_calls_finished_tag 3
#define grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send_tag 6
#define grpc_lb_v1_ClientStats_num_calls_finished_known_received_tag 7
#define grpc_lb_v1_ClientStats_calls_finished_with_drop_tag 8
#define grpc_lb_v1_ClientStatsPerToken_load_balance_token_tag 1
#define grpc_lb_v1_ClientStatsPerToken_num_calls_tag 2
#define grpc_lb_v1_InitialLoadBalanceRequest_name_tag 1
#define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 1
#define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 2
#define grpc_lb_v1_Server_ip_address_tag 1
#define grpc_lb_v1_Server_port_tag 2
#define grpc_lb_v1_Server_load_balance_token_tag 3
#define grpc_lb_v1_Server_drop_tag 4
#define grpc_lb_v1_LoadBalanceRequest_initial_request_tag 1
#define grpc_lb_v1_LoadBalanceRequest_client_stats_tag 2
#define grpc_lb_v1_LoadBalanceResponse_initial_response_tag 1
#define grpc_lb_v1_LoadBalanceResponse_server_list_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t grpc_lb_v1_LoadBalanceRequest_fields[3];
extern const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2];
extern const pb_field_t grpc_lb_v1_ClientStatsPerToken_fields[3];
extern const pb_field_t grpc_lb_v1_ClientStats_fields[7];
extern const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3];
extern const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3];
extern const pb_field_t grpc_lb_v1_ServerList_fields[2];
extern const pb_field_t grpc_lb_v1_Server_fields[5];
/* Maximum encoded size of messages (where known) */
#define grpc_lb_v1_LoadBalanceRequest_size (140 + grpc_lb_v1_ClientStats_size)
#define grpc_lb_v1_InitialLoadBalanceRequest_size 131
/* grpc_lb_v1_ClientStatsPerToken_size depends on runtime parameters */
/* grpc_lb_v1_ClientStats_size depends on runtime parameters */
#define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size)
#define grpc_lb_v1_InitialLoadBalanceResponse_size 90
/* grpc_lb_v1_ServerList_size depends on runtime parameters */
#define grpc_lb_v1_Server_size 83
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define LOAD_BALANCER_MESSAGES \
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */
#endif

@ -116,10 +116,6 @@ TraceFlag grpc_lb_xds_trace(false, "xds");
namespace {
constexpr char kXds[] = "xds_experimental";
constexpr char kDefaultLocalityRegion[] = "xds_default_locality_region";
constexpr char kDefaultLocalityZone[] = "xds_default_locality_zone";
constexpr char kDefaultLocalitySubzone[] = "xds_default_locality_subzone";
constexpr uint32_t kDefaultLocalityWeight = 3;
class ParsedXdsConfig : public LoadBalancingPolicy::Config {
public:
@ -158,9 +154,6 @@ class XdsLb : public LoadBalancingPolicy {
void ResetBackoffLocked() override;
private:
struct LocalityServerlistEntry;
using LocalityList = InlinedVector<UniquePtr<LocalityServerlistEntry>, 1>;
/// Contains a channel to the LB server and all the data related to the
/// channel.
class BalancerChannelState
@ -181,7 +174,7 @@ class XdsLb : public LoadBalancingPolicy {
return client_stats_;
}
bool seen_initial_response() const { return seen_initial_response_; }
bool seen_response() const { return seen_response_; }
private:
GRPC_ALLOW_CLASS_TO_USE_NON_PUBLIC_DELETE
@ -220,7 +213,7 @@ class XdsLb : public LoadBalancingPolicy {
// recv_message
grpc_byte_buffer* recv_message_payload_ = nullptr;
grpc_closure lb_on_balancer_message_received_;
bool seen_initial_response_ = false;
bool seen_response_ = false;
// recv_trailing_metadata
grpc_closure lb_on_balancer_status_received_;
@ -351,57 +344,16 @@ class XdsLb : public LoadBalancingPolicy {
LoadBalancingPolicy* child_ = nullptr;
};
class LocalityName : public RefCounted<LocalityName> {
public:
struct Less {
bool operator()(const RefCountedPtr<LocalityName>& lhs,
const RefCountedPtr<LocalityName>& rhs) {
int cmp_result = strcmp(lhs->region_.get(), rhs->region_.get());
if (cmp_result != 0) return cmp_result < 0;
cmp_result = strcmp(lhs->zone_.get(), rhs->zone_.get());
if (cmp_result != 0) return cmp_result < 0;
return strcmp(lhs->subzone_.get(), rhs->subzone_.get()) < 0;
}
};
LocalityName(UniquePtr<char> region, UniquePtr<char> zone,
UniquePtr<char> subzone)
: region_(std::move(region)),
zone_(std::move(zone)),
subzone_(std::move(subzone)) {}
bool operator==(const LocalityName& other) const {
return strcmp(region_.get(), other.region_.get()) == 0 &&
strcmp(zone_.get(), other.zone_.get()) == 0 &&
strcmp(subzone_.get(), other.subzone_.get()) == 0;
}
const char* AsHumanReadableString() {
if (human_readable_string_ == nullptr) {
char* tmp;
gpr_asprintf(&tmp, "{region=\"%s\", zone=\"%s\", subzone=\"%s\"}",
region_.get(), zone_.get(), subzone_.get());
human_readable_string_.reset(tmp);
}
return human_readable_string_.get();
}
private:
UniquePtr<char> region_;
UniquePtr<char> zone_;
UniquePtr<char> subzone_;
UniquePtr<char> human_readable_string_;
};
class LocalityMap {
public:
class LocalityEntry : public InternallyRefCounted<LocalityEntry> {
public:
LocalityEntry(RefCountedPtr<XdsLb> parent,
RefCountedPtr<LocalityName> name, uint32_t locality_weight);
RefCountedPtr<XdsLocalityName> name,
uint32_t locality_weight);
~LocalityEntry();
void UpdateLocked(xds_grpclb_serverlist* serverlist,
void UpdateLocked(ServerAddressList serverlist,
LoadBalancingPolicy::Config* child_policy_config,
const grpc_channel_args* args);
void ShutdownLocked();
@ -441,7 +393,7 @@ class XdsLb : public LoadBalancingPolicy {
const grpc_channel_args* args);
RefCountedPtr<XdsLb> parent_;
RefCountedPtr<LocalityName> name_;
RefCountedPtr<XdsLocalityName> name_;
OrphanablePtr<LoadBalancingPolicy> child_policy_;
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
RefCountedPtr<PickerRef> picker_ref_;
@ -449,35 +401,25 @@ class XdsLb : public LoadBalancingPolicy {
uint32_t locality_weight_;
};
void UpdateLocked(const LocalityList& locality_list,
void UpdateLocked(const XdsLocalityList& locality_list,
LoadBalancingPolicy::Config* child_policy_config,
const grpc_channel_args* args, XdsLb* parent);
void ShutdownLocked();
void ResetBackoffLocked();
private:
void PruneLocalities(const LocalityList& locality_list);
Map<RefCountedPtr<LocalityName>, OrphanablePtr<LocalityEntry>,
LocalityName::Less>
void PruneLocalities(const XdsLocalityList& locality_list);
Map<RefCountedPtr<XdsLocalityName>, OrphanablePtr<LocalityEntry>,
XdsLocalityName::Less>
map_;
};
struct LocalityServerlistEntry {
~LocalityServerlistEntry() { xds_grpclb_destroy_serverlist(serverlist); }
RefCountedPtr<LocalityName> locality_name;
uint32_t locality_weight;
// The deserialized response from the balancer. May be nullptr until one
// such response has arrived.
xds_grpclb_serverlist* serverlist;
};
~XdsLb();
void ShutdownLocked() override;
// Helper function used in UpdateLocked().
void ProcessAddressesAndChannelArgsLocked(const ServerAddressList& addresses,
void ProcessAddressesAndChannelArgsLocked(ServerAddressList addresses,
const grpc_channel_args& args);
// Parses the xds config given the JSON node of the first child of XdsConfig.
@ -499,7 +441,7 @@ class XdsLb : public LoadBalancingPolicy {
const char* name, const grpc_channel_args* args);
void MaybeExitFallbackMode();
// Who the client is trying to communicate with.
// Name of the backend server to connect to.
const char* server_name_ = nullptr;
// Name of the balancer to connect to.
@ -547,7 +489,7 @@ class XdsLb : public LoadBalancingPolicy {
LocalityMap locality_map_;
// TODO(mhaidry) : Add support for multiple maps of localities
// with different priorities
LocalityList locality_serverlist_;
XdsLocalityList locality_list_;
// TODO(mhaidry) : Add a pending locality map that may be swapped with the
// the current one when new localities in the pending map are ready
// to accept connections
@ -677,79 +619,6 @@ void XdsLb::FallbackHelper::AddTraceEvent(TraceSeverity severity,
parent_->channel_control_helper()->AddTraceEvent(severity, message);
}
//
// serverlist parsing code
//
// Returns the backend addresses extracted from the given addresses.
ServerAddressList ExtractBackendAddresses(const ServerAddressList& addresses) {
ServerAddressList backend_addresses;
for (size_t i = 0; i < addresses.size(); ++i) {
if (!addresses[i].IsBalancer()) {
backend_addresses.emplace_back(addresses[i]);
}
}
return backend_addresses;
}
bool IsServerValid(const xds_grpclb_server* server, size_t idx, bool log) {
if (server->drop) return false;
const xds_grpclb_ip_address* ip = &server->ip_address;
if (GPR_UNLIKELY(server->port >> 16 != 0)) {
if (log) {
gpr_log(GPR_ERROR,
"Invalid port '%d' at index %lu of serverlist. Ignoring.",
server->port, (unsigned long)idx);
}
return false;
}
if (GPR_UNLIKELY(ip->size != 4 && ip->size != 16)) {
if (log) {
gpr_log(GPR_ERROR,
"Expected IP to be 4 or 16 bytes, got %d at index %lu of "
"serverlist. Ignoring",
ip->size, (unsigned long)idx);
}
return false;
}
return true;
}
void ParseServer(const xds_grpclb_server* server, grpc_resolved_address* addr) {
memset(addr, 0, sizeof(*addr));
if (server->drop) return;
const uint16_t netorder_port = grpc_htons((uint16_t)server->port);
/* the addresses are given in binary format (a in(6)_addr struct) in
* server->ip_address.bytes. */
const xds_grpclb_ip_address* ip = &server->ip_address;
if (ip->size == 4) {
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(&addr->addr);
addr4->sin_family = GRPC_AF_INET;
memcpy(&addr4->sin_addr, ip->bytes, ip->size);
addr4->sin_port = netorder_port;
} else if (ip->size == 16) {
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)&addr->addr;
addr6->sin6_family = GRPC_AF_INET6;
memcpy(&addr6->sin6_addr, ip->bytes, ip->size);
addr6->sin6_port = netorder_port;
}
}
// Returns addresses extracted from \a serverlist.
ServerAddressList ProcessServerlist(const xds_grpclb_serverlist* serverlist) {
ServerAddressList addresses;
for (size_t i = 0; i < serverlist->num_servers; ++i) {
const xds_grpclb_server* server = serverlist->servers[i];
if (!IsServerValid(serverlist->servers[i], i, false)) continue;
grpc_resolved_address addr;
ParseServer(server, &addr);
addresses.emplace_back(addr, nullptr);
}
return addresses;
}
//
// XdsLb::BalancerChannelState
//
@ -913,19 +782,18 @@ XdsLb::BalancerChannelState::BalancerCallState::BalancerCallState(
xdslb_policy()->lb_call_timeout_ms_ == 0
? GRPC_MILLIS_INF_FUTURE
: ExecCtx::Get()->Now() + xdslb_policy()->lb_call_timeout_ms_;
// Create an LB call with the specified method name.
lb_call_ = grpc_channel_create_pollset_set_call(
lb_chand_->channel_, nullptr, GRPC_PROPAGATE_DEFAULTS,
xdslb_policy()->interested_parties(),
GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD,
GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS,
nullptr, deadline, nullptr);
// Init the LB call request payload.
xds_grpclb_request* request =
xds_grpclb_request_create(xdslb_policy()->server_name_);
grpc_slice request_payload_slice = xds_grpclb_request_encode(request);
grpc_slice request_payload_slice =
XdsEdsRequestCreateAndEncode(xdslb_policy()->server_name_);
send_message_payload_ =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_slice_unref_internal(request_payload_slice);
xds_grpclb_request_destroy(request);
// Init other data associated with the LB call.
grpc_metadata_array_init(&lb_initial_metadata_recv_);
grpc_metadata_array_init(&lb_trailing_metadata_recv_);
@ -1068,15 +936,20 @@ void XdsLb::BalancerChannelState::BalancerCallState::
bool XdsLb::BalancerChannelState::BalancerCallState::LoadReportCountersAreZero(
xds_grpclb_request* request) {
XdsLbClientStats::DroppedCallCounts* drop_entries =
static_cast<XdsLbClientStats::DroppedCallCounts*>(
request->client_stats.calls_finished_with_drop.arg);
return request->client_stats.num_calls_started == 0 &&
request->client_stats.num_calls_finished == 0 &&
request->client_stats.num_calls_finished_with_client_failed_to_send ==
const grpc_lb_v1_ClientStats* cstats =
grpc_lb_v1_LoadBalanceRequest_client_stats(request);
if (cstats == nullptr) {
return true;
}
size_t drop_count;
grpc_lb_v1_ClientStats_calls_finished_with_drop(cstats, &drop_count);
return grpc_lb_v1_ClientStats_num_calls_started(cstats) == 0 &&
grpc_lb_v1_ClientStats_num_calls_finished(cstats) == 0 &&
grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(
cstats) == 0 &&
grpc_lb_v1_ClientStats_num_calls_finished_known_received(cstats) ==
0 &&
request->client_stats.num_calls_finished_known_received == 0 &&
(drop_entries == nullptr || drop_entries->empty());
drop_count == 0;
}
// TODO(vpowar): Use LRS to send the client Load Report.
@ -1084,13 +957,13 @@ void XdsLb::BalancerChannelState::BalancerCallState::
SendClientLoadReportLocked() {
// Construct message payload.
GPR_ASSERT(send_message_payload_ == nullptr);
xds_grpclb_request* request =
xds_grpclb_load_report_request_create_locked(client_stats_.get());
upb::Arena arena;
xds_grpclb_request* request = xds_grpclb_load_report_request_create_locked(
client_stats_.get(), arena.ptr());
// Skip client load report if the counters were all zero in the last
// report and they are still zero in this one.
if (LoadReportCountersAreZero(request)) {
if (last_client_load_report_counters_were_zero_) {
xds_grpclb_request_destroy(request);
ScheduleNextClientLoadReportLocked();
return;
}
@ -1099,7 +972,6 @@ void XdsLb::BalancerChannelState::BalancerCallState::
last_client_load_report_counters_were_zero_ = false;
}
// TODO(vpowar): Send the report on LRS stream.
xds_grpclb_request_destroy(request);
}
void XdsLb::BalancerChannelState::BalancerCallState::OnInitialRequestSentLocked(
@ -1127,65 +999,67 @@ void XdsLb::BalancerChannelState::BalancerCallState::
lb_calld->Unref(DEBUG_LOCATION, "on_message_received");
return;
}
lb_calld->seen_response_ = true;
// Read the response.
grpc_byte_buffer_reader bbr;
grpc_byte_buffer_reader_init(&bbr, lb_calld->recv_message_payload_);
grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr);
grpc_byte_buffer_reader_destroy(&bbr);
grpc_byte_buffer_destroy(lb_calld->recv_message_payload_);
lb_calld->recv_message_payload_ = nullptr;
xds_grpclb_initial_response* initial_response;
xds_grpclb_serverlist* serverlist;
if (!lb_calld->seen_initial_response_ &&
(initial_response = xds_grpclb_initial_response_parse(response_slice)) !=
nullptr) {
// Have NOT seen initial response, look for initial response.
// TODO(juanlishen): When we convert this to use the xds protocol, the
// balancer will send us a fallback timeout such that we should go into
// fallback mode if we have lost contact with the balancer after a certain
// period of time. We will need to save the timeout value here, and then
// when the balancer call ends, we will need to start a timer for the
// specified period of time, and if the timer fires, we go into fallback
// mode. We will also need to cancel the timer when we receive a serverlist
// from the balancer.
if (initial_response->has_client_stats_report_interval) {
const grpc_millis interval = xds_grpclb_duration_to_millis(
&initial_response->client_stats_report_interval);
if (interval > 0) {
lb_calld->client_stats_report_interval_ =
GPR_MAX(GPR_MS_PER_SEC, interval);
}
// TODO(juanlishen): When we convert this to use the xds protocol, the
// balancer will send us a fallback timeout such that we should go into
// fallback mode if we have lost contact with the balancer after a certain
// period of time. We will need to save the timeout value here, and then
// when the balancer call ends, we will need to start a timer for the
// specified period of time, and if the timer fires, we go into fallback
// mode. We will also need to cancel the timer when we receive a serverlist
// from the balancer.
// This anonymous lambda is a hack to avoid the usage of goto.
[&]() {
// Parse the response.
XdsUpdate update;
grpc_error* parse_error =
XdsEdsResponseDecodeAndParse(response_slice, &update);
if (parse_error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR, "[xdslb %p] EDS response parsing failed. error=%s",
xdslb_policy, grpc_error_string(parse_error));
GRPC_ERROR_UNREF(parse_error);
return;
}
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_trace)) {
if (lb_calld->client_stats_report_interval_ != 0) {
gpr_log(GPR_INFO,
"[xdslb %p] Received initial LB response message; "
"client load reporting interval = %" PRId64 " milliseconds",
xdslb_policy, lb_calld->client_stats_report_interval_);
} else {
gpr_log(GPR_INFO,
"[xdslb %p] Received initial LB response message; client load "
"reporting NOT enabled",
xdslb_policy);
}
if (update.locality_list.empty()) {
char* response_slice_str =
grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX);
gpr_log(GPR_ERROR,
"[xdslb %p] EDS response '%s' doesn't contain any valid locality "
"update. Ignoring.",
xdslb_policy, response_slice_str);
gpr_free(response_slice_str);
return;
}
xds_grpclb_initial_response_destroy(initial_response);
lb_calld->seen_initial_response_ = true;
} else if ((serverlist = xds_grpclb_response_parse_serverlist(
response_slice)) != nullptr) {
// Have seen initial response, look for serverlist.
GPR_ASSERT(lb_calld->lb_call_ != nullptr);
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_trace)) {
gpr_log(GPR_INFO,
"[xdslb %p] Serverlist with %" PRIuPTR " servers received",
xdslb_policy, serverlist->num_servers);
for (size_t i = 0; i < serverlist->num_servers; ++i) {
grpc_resolved_address addr;
ParseServer(serverlist->servers[i], &addr);
char* ipport;
grpc_sockaddr_to_string(&ipport, &addr, false);
gpr_log(GPR_INFO, "[xdslb %p] Serverlist[%" PRIuPTR "]: %s",
xdslb_policy, i, ipport);
gpr_free(ipport);
"[xdslb %p] EDS response with %" PRIuPTR " localities received",
xdslb_policy, update.locality_list.size());
for (size_t i = 0; i < update.locality_list.size(); ++i) {
const XdsLocalityInfo& locality = update.locality_list[i];
gpr_log(GPR_INFO,
"[xdslb %p] Locality %" PRIuPTR " %s contains %" PRIuPTR
" server addresses",
xdslb_policy, i,
locality.locality_name->AsHumanReadableString(),
locality.serverlist.size());
for (size_t j = 0; j < locality.serverlist.size(); ++j) {
char* ipport;
grpc_sockaddr_to_string(&ipport, &locality.serverlist[j].address(),
false);
gpr_log(GPR_INFO,
"[xdslb %p] Locality %" PRIuPTR
" %s, server address %" PRIuPTR ": %s",
xdslb_policy, i,
locality.locality_name->AsHumanReadableString(), j, ipport);
gpr_free(ipport);
}
}
}
// Pending LB channel receives a serverlist; promote it.
@ -1211,73 +1085,47 @@ void XdsLb::BalancerChannelState::BalancerCallState::
lb_calld->Ref(DEBUG_LOCATION, "client_load_report").release();
lb_calld->ScheduleNextClientLoadReportLocked();
}
if (!xdslb_policy->locality_serverlist_.empty() &&
xds_grpclb_serverlist_equals(
xdslb_policy->locality_serverlist_[0]->serverlist, serverlist)) {
// Ignore identical update.
if (xdslb_policy->locality_list_ == update.locality_list) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_trace)) {
gpr_log(GPR_INFO,
"[xdslb %p] Incoming server list identical to current, "
"ignoring.",
xdslb_policy);
}
xds_grpclb_destroy_serverlist(serverlist);
} else { // New serverlist.
// If the balancer tells us to drop all the calls, we should exit fallback
// mode immediately.
// TODO(juanlishen): When we add EDS drop, we should change to check
// drop_percentage.
if (serverlist->num_servers == 0) xdslb_policy->MaybeExitFallbackMode();
if (!xdslb_policy->locality_serverlist_.empty()) {
xds_grpclb_destroy_serverlist(
xdslb_policy->locality_serverlist_[0]->serverlist);
} else {
// Initialize locality serverlist, currently the list only handles
// one child.
xdslb_policy->locality_serverlist_.emplace_back(
MakeUnique<LocalityServerlistEntry>());
xdslb_policy->locality_serverlist_[0]->locality_name =
MakeRefCounted<LocalityName>(
UniquePtr<char>(gpr_strdup(kDefaultLocalityRegion)),
UniquePtr<char>(gpr_strdup(kDefaultLocalityZone)),
UniquePtr<char>(gpr_strdup(kDefaultLocalitySubzone)));
xdslb_policy->locality_serverlist_[0]->locality_weight =
kDefaultLocalityWeight;
}
// Update the serverlist in the XdsLb instance. This serverlist
// instance will be destroyed either upon the next update or when the
// XdsLb instance is destroyed.
xdslb_policy->locality_serverlist_[0]->serverlist = serverlist;
xdslb_policy->locality_map_.UpdateLocked(
xdslb_policy->locality_serverlist_,
xdslb_policy->child_policy_config_.get(), xdslb_policy->args_,
xdslb_policy);
return;
}
} else {
// No valid initial response or serverlist found.
char* response_slice_str =
grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX);
gpr_log(GPR_ERROR,
"[xdslb %p] Invalid LB response received: '%s'. Ignoring.",
xdslb_policy, response_slice_str);
gpr_free(response_slice_str);
}
// If the balancer tells us to drop all the calls, we should exit fallback
// mode immediately.
// TODO(juanlishen): When we add EDS drop, we should change to check
// drop_percentage.
if (update.locality_list[0].serverlist.empty()) {
xdslb_policy->MaybeExitFallbackMode();
}
// Update the locality list.
xdslb_policy->locality_list_ = std::move(update.locality_list);
// Update the locality map.
xdslb_policy->locality_map_.UpdateLocked(
xdslb_policy->locality_list_, xdslb_policy->child_policy_config_.get(),
xdslb_policy->args_, xdslb_policy);
}();
grpc_slice_unref_internal(response_slice);
if (!xdslb_policy->shutting_down_) {
// Keep listening for serverlist updates.
grpc_op op;
memset(&op, 0, sizeof(op));
op.op = GRPC_OP_RECV_MESSAGE;
op.data.recv_message.recv_message = &lb_calld->recv_message_payload_;
op.flags = 0;
op.reserved = nullptr;
// Reuse the "OnBalancerMessageReceivedLocked" ref taken in StartQuery().
const grpc_call_error call_error = grpc_call_start_batch_and_execute(
lb_calld->lb_call_, &op, 1,
&lb_calld->lb_on_balancer_message_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
} else {
if (xdslb_policy->shutting_down_) {
lb_calld->Unref(DEBUG_LOCATION, "on_message_received+xds_shutdown");
return;
}
// Keep listening for serverlist updates.
grpc_op op;
memset(&op, 0, sizeof(op));
op.op = GRPC_OP_RECV_MESSAGE;
op.data.recv_message.recv_message = &lb_calld->recv_message_payload_;
op.flags = 0;
op.reserved = nullptr;
GPR_ASSERT(lb_calld->lb_call_ != nullptr);
// Reuse the "OnBalancerMessageReceivedLocked" ref taken in StartQuery().
const grpc_call_error call_error = grpc_call_start_batch_and_execute(
lb_calld->lb_call_, &op, 1, &lb_calld->lb_on_balancer_message_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
void XdsLb::BalancerChannelState::BalancerCallState::
@ -1317,7 +1165,7 @@ void XdsLb::BalancerChannelState::BalancerCallState::
// This channel is the most recently created one. Try to restart the call
// and reresolve.
lb_chand->lb_calld_.reset();
if (lb_calld->seen_initial_response_) {
if (lb_calld->seen_response_) {
// If we lost connection to the LB server, reset the backoff and restart
// the LB call immediately.
lb_chand->lb_call_backoff_.Reset();
@ -1402,9 +1250,7 @@ grpc_channel_args* BuildBalancerChannelArgs(const grpc_channel_args* args) {
//
XdsLb::XdsLb(Args args)
: LoadBalancingPolicy(std::move(args)),
locality_map_(),
locality_serverlist_() {
: LoadBalancingPolicy(std::move(args)), locality_map_(), locality_list_() {
// Record server name.
const grpc_arg* arg = grpc_channel_args_find(args.args, GRPC_ARG_SERVER_URI);
const char* server_uri = grpc_channel_arg_get_string(arg);
@ -1433,7 +1279,7 @@ XdsLb::~XdsLb() {
}
gpr_free((void*)server_name_);
grpc_channel_args_destroy(args_);
locality_serverlist_.clear();
locality_list_.clear();
}
void XdsLb::ShutdownLocked() {
@ -1482,9 +1328,9 @@ void XdsLb::ResetBackoffLocked() {
}
void XdsLb::ProcessAddressesAndChannelArgsLocked(
const ServerAddressList& addresses, const grpc_channel_args& args) {
ServerAddressList addresses, const grpc_channel_args& args) {
// Update fallback address list.
fallback_backend_addresses_ = ExtractBackendAddresses(addresses);
fallback_backend_addresses_ = std::move(addresses);
// Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args,
// since we use this to trigger the client_load_reporting filter.
static const char* args_to_remove[] = {GRPC_ARG_LB_POLICY_NAME};
@ -1536,9 +1382,9 @@ void XdsLb::UpdateLocked(UpdateArgs args) {
gpr_log(GPR_ERROR, "[xdslb %p] LB config parsing fails.", this);
return;
}
ProcessAddressesAndChannelArgsLocked(args.addresses, *args.args);
locality_map_.UpdateLocked(locality_serverlist_, child_policy_config_.get(),
args_, this);
ProcessAddressesAndChannelArgsLocked(std::move(args.addresses), *args.args);
locality_map_.UpdateLocked(locality_list_, child_policy_config_.get(), args_,
this);
// Update the existing fallback policy. The fallback policy config and/or the
// fallback addresses may be new.
if (fallback_policy_ != nullptr) UpdateFallbackPolicyLocked();
@ -1736,16 +1582,16 @@ void XdsLb::MaybeExitFallbackMode() {
// XdsLb::LocalityMap
//
void XdsLb::LocalityMap::PruneLocalities(const LocalityList& locality_list) {
void XdsLb::LocalityMap::PruneLocalities(const XdsLocalityList& locality_list) {
for (auto iter = map_.begin(); iter != map_.end();) {
bool found = false;
for (size_t i = 0; i < locality_list.size(); i++) {
if (*locality_list[i]->locality_name == *iter->first) {
if (*locality_list[i].locality_name == *iter->first) {
found = true;
break;
}
}
if (!found) { // Remove entries not present in the locality list
if (!found) { // Remove entries not present in the locality list.
iter = map_.erase(iter);
} else
iter++;
@ -1753,27 +1599,27 @@ void XdsLb::LocalityMap::PruneLocalities(const LocalityList& locality_list) {
}
void XdsLb::LocalityMap::UpdateLocked(
const LocalityList& locality_serverlist,
const XdsLocalityList& locality_list,
LoadBalancingPolicy::Config* child_policy_config,
const grpc_channel_args* args, XdsLb* parent) {
if (parent->shutting_down_) return;
for (size_t i = 0; i < locality_serverlist.size(); i++) {
auto iter = map_.find(locality_serverlist[i]->locality_name);
for (size_t i = 0; i < locality_list.size(); i++) {
auto iter = map_.find(locality_list[i].locality_name);
// Add a new entry in the locality map if a new locality is received in the
// locality list.
if (iter == map_.end()) {
OrphanablePtr<LocalityEntry> new_entry = MakeOrphanable<LocalityEntry>(
parent->Ref(DEBUG_LOCATION, "LocalityEntry"),
locality_serverlist[i]->locality_name,
locality_serverlist[i]->locality_weight);
iter = map_.emplace(locality_serverlist[i]->locality_name,
std::move(new_entry))
locality_list[i].locality_name, locality_list[i].lb_weight);
iter = map_.emplace(locality_list[i].locality_name, std::move(new_entry))
.first;
}
// Don't create new child policies if not directed to
xds_grpclb_serverlist* serverlist =
parent->locality_serverlist_[i]->serverlist;
iter->second->UpdateLocked(serverlist, child_policy_config, args);
// Keep a copy of serverlist in locality_list_ so that we can compare it
// with the future ones.
iter->second->UpdateLocked(locality_list[i].serverlist, child_policy_config,
args);
}
PruneLocalities(locality_serverlist);
PruneLocalities(locality_list);
}
void XdsLb::LocalityMap::ShutdownLocked() { map_.clear(); }
@ -1789,7 +1635,7 @@ void XdsLb::LocalityMap::ResetBackoffLocked() {
//
XdsLb::LocalityMap::LocalityEntry::LocalityEntry(
RefCountedPtr<XdsLb> parent, RefCountedPtr<LocalityName> name,
RefCountedPtr<XdsLb> parent, RefCountedPtr<XdsLocalityName> name,
uint32_t locality_weight)
: parent_(std::move(parent)),
name_(std::move(name)),
@ -1861,13 +1707,13 @@ XdsLb::LocalityMap::LocalityEntry::CreateChildPolicyLocked(
}
void XdsLb::LocalityMap::LocalityEntry::UpdateLocked(
xds_grpclb_serverlist* serverlist,
ServerAddressList serverlist,
LoadBalancingPolicy::Config* child_policy_config,
const grpc_channel_args* args_in) {
if (parent_->shutting_down_) return;
// Construct update args.
UpdateArgs update_args;
update_args.addresses = ProcessServerlist(serverlist);
update_args.addresses = std::move(serverlist);
update_args.config =
child_policy_config == nullptr ? nullptr : child_policy_config->Ref();
update_args.args = CreateChildPolicyArgsLocked(args_in);
@ -2158,7 +2004,7 @@ void XdsLb::LocalityMap::LocalityEntry::Helper::RequestReresolution() {
// the child policy. Otherwise, pass the re-resolution request up to the
// channel.
if (entry_->parent_->lb_chand_->lb_calld() == nullptr ||
!entry_->parent_->lb_chand_->lb_calld()->seen_initial_response()) {
!entry_->parent_->lb_chand_->lb_calld()->seen_response()) {
entry_->parent_->channel_control_helper()->RequestReresolution();
}
}

@ -18,294 +18,245 @@
#include <grpc/support/port_platform.h>
#include "pb_decode.h"
#include "pb_encode.h"
#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h"
#include <algorithm>
#include <grpc/impl/codegen/log.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
/* invoked once for every Server in ServerList */
static bool count_serverlist(pb_istream_t* stream, const pb_field_t* field,
void** arg) {
xds_grpclb_serverlist* sl = static_cast<xds_grpclb_serverlist*>(*arg);
xds_grpclb_server server;
if (GPR_UNLIKELY(!pb_decode(stream, grpc_lb_v1_Server_fields, &server))) {
gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(stream));
return false;
}
++sl->num_servers;
return true;
}
#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
typedef struct decode_serverlist_arg {
/* The decoding callback is invoked once per server in serverlist. Remember
* which index of the serverlist are we currently decoding */
size_t decoding_idx;
/* The decoded serverlist */
xds_grpclb_serverlist* serverlist;
} decode_serverlist_arg;
#include "envoy/api/v2/core/address.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/api/v2/discovery.upb.h"
#include "envoy/api/v2/eds.upb.h"
#include "envoy/api/v2/endpoint/endpoint.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/timestamp.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "upb/upb.h"
/* invoked once for every Server in ServerList */
static bool decode_serverlist(pb_istream_t* stream, const pb_field_t* field,
void** arg) {
decode_serverlist_arg* dec_arg = static_cast<decode_serverlist_arg*>(*arg);
GPR_ASSERT(dec_arg->serverlist->num_servers >= dec_arg->decoding_idx);
xds_grpclb_server* server =
static_cast<xds_grpclb_server*>(gpr_zalloc(sizeof(xds_grpclb_server)));
if (GPR_UNLIKELY(!pb_decode(stream, grpc_lb_v1_Server_fields, server))) {
gpr_free(server);
gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(stream));
return false;
}
dec_arg->serverlist->servers[dec_arg->decoding_idx++] = server;
return true;
}
namespace grpc_core {
xds_grpclb_request* xds_grpclb_request_create(const char* lb_service_name) {
xds_grpclb_request* req =
static_cast<xds_grpclb_request*>(gpr_malloc(sizeof(xds_grpclb_request)));
req->has_client_stats = false;
req->has_initial_request = true;
req->initial_request.has_name = true;
// GCC warns (-Wstringop-truncation) because the destination
// buffer size is identical to max-size, leading to a potential
// char[] with no null terminator. nanopb can handle it fine,
// and parantheses around strncpy silence that compiler warning.
(strncpy(req->initial_request.name, lb_service_name,
XDS_SERVICE_NAME_MAX_LENGTH));
return req;
}
namespace {
static void populate_timestamp(gpr_timespec timestamp,
xds_grpclb_timestamp* timestamp_pb) {
timestamp_pb->has_seconds = true;
timestamp_pb->seconds = timestamp.tv_sec;
timestamp_pb->has_nanos = true;
timestamp_pb->nanos = timestamp.tv_nsec;
}
constexpr char kEdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.ClusterLoadAssignment";
constexpr char kEndpointRequired[] = "endpointRequired";
static bool encode_string(pb_ostream_t* stream, const pb_field_t* field,
void* const* arg) {
char* str = static_cast<char*>(*arg);
if (!pb_encode_tag_for_field(stream, field)) return false;
return pb_encode_string(stream, reinterpret_cast<uint8_t*>(str), strlen(str));
}
} // namespace
static bool encode_drops(pb_ostream_t* stream, const pb_field_t* field,
void* const* arg) {
grpc_core::XdsLbClientStats::DroppedCallCounts* drop_entries =
static_cast<grpc_core::XdsLbClientStats::DroppedCallCounts*>(*arg);
if (drop_entries == nullptr) return true;
for (size_t i = 0; i < drop_entries->size(); ++i) {
if (!pb_encode_tag_for_field(stream, field)) return false;
grpc_lb_v1_ClientStatsPerToken drop_message;
drop_message.load_balance_token.funcs.encode = encode_string;
drop_message.load_balance_token.arg = (*drop_entries)[i].token.get();
drop_message.has_num_calls = true;
drop_message.num_calls = (*drop_entries)[i].count;
if (!pb_encode_submessage(stream, grpc_lb_v1_ClientStatsPerToken_fields,
&drop_message)) {
return false;
}
}
return true;
}
xds_grpclb_request* xds_grpclb_load_report_request_create_locked(
grpc_core::XdsLbClientStats* client_stats) {
xds_grpclb_request* req =
static_cast<xds_grpclb_request*>(gpr_zalloc(sizeof(xds_grpclb_request)));
req->has_client_stats = true;
req->client_stats.has_timestamp = true;
populate_timestamp(gpr_now(GPR_CLOCK_REALTIME), &req->client_stats.timestamp);
req->client_stats.has_num_calls_started = true;
req->client_stats.has_num_calls_finished = true;
req->client_stats.has_num_calls_finished_with_client_failed_to_send = true;
req->client_stats.has_num_calls_finished_with_client_failed_to_send = true;
req->client_stats.has_num_calls_finished_known_received = true;
req->client_stats.calls_finished_with_drop.funcs.encode = encode_drops;
grpc_core::UniquePtr<grpc_core::XdsLbClientStats::DroppedCallCounts>
drop_counts;
client_stats->GetLocked(
&req->client_stats.num_calls_started,
&req->client_stats.num_calls_finished,
&req->client_stats.num_calls_finished_with_client_failed_to_send,
&req->client_stats.num_calls_finished_known_received, &drop_counts);
// Will be deleted in xds_grpclb_request_destroy().
req->client_stats.calls_finished_with_drop.arg = drop_counts.release();
return req;
grpc_slice XdsEdsRequestCreateAndEncode(const char* service_name) {
upb::Arena arena;
// Create a request.
envoy_api_v2_DiscoveryRequest* request =
envoy_api_v2_DiscoveryRequest_new(arena.ptr());
envoy_api_v2_core_Node* node =
envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr());
google_protobuf_Struct* metadata =
envoy_api_v2_core_Node_mutable_metadata(node, arena.ptr());
google_protobuf_Struct_FieldsEntry* field =
google_protobuf_Struct_add_fields(metadata, arena.ptr());
google_protobuf_Struct_FieldsEntry_set_key(
field, upb_strview_makez(kEndpointRequired));
google_protobuf_Value* value =
google_protobuf_Struct_FieldsEntry_mutable_value(field, arena.ptr());
google_protobuf_Value_set_bool_value(value, true);
envoy_api_v2_DiscoveryRequest_add_resource_names(
request, upb_strview_makez(service_name), arena.ptr());
envoy_api_v2_DiscoveryRequest_set_type_url(request,
upb_strview_makez(kEdsTypeUrl));
// Encode the request.
size_t output_length;
char* output = envoy_api_v2_DiscoveryRequest_serialize(request, arena.ptr(),
&output_length);
return grpc_slice_from_copied_buffer(output, output_length);
}
grpc_slice xds_grpclb_request_encode(const xds_grpclb_request* request) {
size_t encoded_length;
pb_ostream_t sizestream;
pb_ostream_t outputstream;
grpc_slice slice;
memset(&sizestream, 0, sizeof(pb_ostream_t));
pb_encode(&sizestream, grpc_lb_v1_LoadBalanceRequest_fields, request);
encoded_length = sizestream.bytes_written;
namespace {
slice = GRPC_SLICE_MALLOC(encoded_length);
outputstream =
pb_ostream_from_buffer(GRPC_SLICE_START_PTR(slice), encoded_length);
GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields,
request) != 0);
return slice;
}
void xds_grpclb_request_destroy(xds_grpclb_request* request) {
if (request->has_client_stats) {
grpc_core::XdsLbClientStats::DroppedCallCounts* drop_entries =
static_cast<grpc_core::XdsLbClientStats::DroppedCallCounts*>(
request->client_stats.calls_finished_with_drop.arg);
grpc_core::Delete(drop_entries);
grpc_error* ServerAddressParseAndAppend(
const envoy_api_v2_endpoint_LbEndpoint* lb_endpoint,
ServerAddressList* list) {
// Find the ip:port.
const envoy_api_v2_endpoint_Endpoint* endpoint =
envoy_api_v2_endpoint_LbEndpoint_endpoint(lb_endpoint);
const envoy_api_v2_core_Address* address =
envoy_api_v2_endpoint_Endpoint_address(endpoint);
const envoy_api_v2_core_SocketAddress* socket_address =
envoy_api_v2_core_Address_socket_address(address);
upb_strview address_strview =
envoy_api_v2_core_SocketAddress_address(socket_address);
uint32_t port = envoy_api_v2_core_SocketAddress_port_value(socket_address);
if (GPR_UNLIKELY(port >> 16) != 0) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid port.");
}
gpr_free(request);
// Populate grpc_resolved_address.
grpc_resolved_address addr;
char* address_str = static_cast<char*>(gpr_malloc(address_strview.size + 1));
memcpy(address_str, address_strview.data, address_strview.size);
address_str[address_strview.size] = '\0';
grpc_string_to_sockaddr(&addr, address_str, port);
gpr_free(address_str);
// Append the address to the list.
list->emplace_back(addr, nullptr);
return GRPC_ERROR_NONE;
}
typedef grpc_lb_v1_LoadBalanceResponse xds_grpclb_response;
xds_grpclb_initial_response* xds_grpclb_initial_response_parse(
const grpc_slice& encoded_xds_grpclb_response) {
pb_istream_t stream = pb_istream_from_buffer(
const_cast<uint8_t*>(GRPC_SLICE_START_PTR(encoded_xds_grpclb_response)),
GRPC_SLICE_LENGTH(encoded_xds_grpclb_response));
xds_grpclb_response res;
memset(&res, 0, sizeof(xds_grpclb_response));
if (GPR_UNLIKELY(
!pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res))) {
gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return nullptr;
}
if (!res.has_initial_response) return nullptr;
xds_grpclb_initial_response* initial_res =
static_cast<xds_grpclb_initial_response*>(
gpr_malloc(sizeof(xds_grpclb_initial_response)));
memcpy(initial_res, &res.initial_response,
sizeof(xds_grpclb_initial_response));
namespace {
return initial_res;
UniquePtr<char> StringCopy(const upb_strview& strview) {
char* str = static_cast<char*>(gpr_malloc(strview.size + 1));
memcpy(str, strview.data, strview.size);
str[strview.size] = '\0';
return UniquePtr<char>(str);
}
xds_grpclb_serverlist* xds_grpclb_response_parse_serverlist(
const grpc_slice& encoded_xds_grpclb_response) {
pb_istream_t stream = pb_istream_from_buffer(
const_cast<uint8_t*>(GRPC_SLICE_START_PTR(encoded_xds_grpclb_response)),
GRPC_SLICE_LENGTH(encoded_xds_grpclb_response));
pb_istream_t stream_at_start = stream;
xds_grpclb_serverlist* sl = static_cast<xds_grpclb_serverlist*>(
gpr_zalloc(sizeof(xds_grpclb_serverlist)));
xds_grpclb_response res;
memset(&res, 0, sizeof(xds_grpclb_response));
// First pass: count number of servers.
res.server_list.servers.funcs.decode = count_serverlist;
res.server_list.servers.arg = sl;
bool status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res);
if (GPR_UNLIKELY(!status)) {
gpr_free(sl);
gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return nullptr;
}
// Second pass: populate servers.
if (sl->num_servers > 0) {
sl->servers = static_cast<xds_grpclb_server**>(
gpr_zalloc(sizeof(xds_grpclb_server*) * sl->num_servers));
decode_serverlist_arg decode_arg;
memset(&decode_arg, 0, sizeof(decode_arg));
decode_arg.serverlist = sl;
res.server_list.servers.funcs.decode = decode_serverlist;
res.server_list.servers.arg = &decode_arg;
status = pb_decode(&stream_at_start, grpc_lb_v1_LoadBalanceResponse_fields,
&res);
if (GPR_UNLIKELY(!status)) {
xds_grpclb_destroy_serverlist(sl);
gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return nullptr;
}
}
return sl;
}
} // namespace
void xds_grpclb_destroy_serverlist(xds_grpclb_serverlist* serverlist) {
if (serverlist == nullptr) {
return;
}
for (size_t i = 0; i < serverlist->num_servers; i++) {
gpr_free(serverlist->servers[i]);
grpc_error* LocalityParse(
const envoy_api_v2_endpoint_LocalityLbEndpoints* locality_lb_endpoints,
XdsLocalityInfo* locality_info) {
// Parse locality name.
const envoy_api_v2_core_Locality* locality =
envoy_api_v2_endpoint_LocalityLbEndpoints_locality(locality_lb_endpoints);
locality_info->locality_name = MakeRefCounted<XdsLocalityName>(
StringCopy(envoy_api_v2_core_Locality_region(locality)),
StringCopy(envoy_api_v2_core_Locality_zone(locality)),
StringCopy(envoy_api_v2_core_Locality_sub_zone(locality)));
// Parse the addresses.
size_t size;
const envoy_api_v2_endpoint_LbEndpoint* const* lb_endpoints =
envoy_api_v2_endpoint_LocalityLbEndpoints_lb_endpoints(
locality_lb_endpoints, &size);
for (size_t i = 0; i < size; ++i) {
grpc_error* error = ServerAddressParseAndAppend(lb_endpoints[i],
&locality_info->serverlist);
if (error != GRPC_ERROR_NONE) return error;
}
gpr_free(serverlist->servers);
gpr_free(serverlist);
// Parse the lb_weight and priority.
const google_protobuf_UInt32Value* lb_weight =
envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight(
locality_lb_endpoints);
// If LB weight is not specified, the default weight 0 is used, which means
// this locality is assigned no load.
locality_info->lb_weight =
lb_weight != nullptr ? google_protobuf_UInt32Value_value(lb_weight) : 0;
locality_info->priority =
envoy_api_v2_endpoint_LocalityLbEndpoints_priority(locality_lb_endpoints);
return GRPC_ERROR_NONE;
}
xds_grpclb_serverlist* xds_grpclb_serverlist_copy(
const xds_grpclb_serverlist* sl) {
xds_grpclb_serverlist* copy = static_cast<xds_grpclb_serverlist*>(
gpr_zalloc(sizeof(xds_grpclb_serverlist)));
copy->num_servers = sl->num_servers;
copy->servers = static_cast<xds_grpclb_server**>(
gpr_malloc(sizeof(xds_grpclb_server*) * sl->num_servers));
for (size_t i = 0; i < sl->num_servers; i++) {
copy->servers[i] =
static_cast<xds_grpclb_server*>(gpr_malloc(sizeof(xds_grpclb_server)));
memcpy(copy->servers[i], sl->servers[i], sizeof(xds_grpclb_server));
}
return copy;
}
} // namespace
bool xds_grpclb_serverlist_equals(const xds_grpclb_serverlist* lhs,
const xds_grpclb_serverlist* rhs) {
if (lhs == nullptr || rhs == nullptr) {
return false;
grpc_error* XdsEdsResponseDecodeAndParse(const grpc_slice& encoded_response,
XdsUpdate* update) {
upb::Arena arena;
// Decode the response.
const envoy_api_v2_DiscoveryResponse* response =
envoy_api_v2_DiscoveryResponse_parse(
reinterpret_cast<const char*>(GRPC_SLICE_START_PTR(encoded_response)),
GRPC_SLICE_LENGTH(encoded_response), arena.ptr());
// Parse the response.
if (response == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("No response found.");
}
if (lhs->num_servers != rhs->num_servers) {
return false;
// Check the type_url of the response.
upb_strview type_url = envoy_api_v2_DiscoveryResponse_type_url(response);
upb_strview expected_type_url = upb_strview_makez(kEdsTypeUrl);
if (!upb_strview_eql(type_url, expected_type_url)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not EDS.");
}
for (size_t i = 0; i < lhs->num_servers; i++) {
if (!xds_grpclb_server_equals(lhs->servers[i], rhs->servers[i])) {
return false;
}
// Get the resources from the response.
size_t size;
const google_protobuf_Any* const* resources =
envoy_api_v2_DiscoveryResponse_resources(response, &size);
if (size < 1) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"EDS response contains 0 resource.");
}
// Check the type_url of the resource.
type_url = google_protobuf_Any_type_url(resources[0]);
if (!upb_strview_eql(type_url, expected_type_url)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not EDS.");
}
// Get the cluster_load_assignment.
upb_strview encoded_cluster_load_assignment =
google_protobuf_Any_value(resources[0]);
envoy_api_v2_ClusterLoadAssignment* cluster_load_assignment =
envoy_api_v2_ClusterLoadAssignment_parse(
encoded_cluster_load_assignment.data,
encoded_cluster_load_assignment.size, arena.ptr());
const envoy_api_v2_endpoint_LocalityLbEndpoints* const* endpoints =
envoy_api_v2_ClusterLoadAssignment_endpoints(cluster_load_assignment,
&size);
for (size_t i = 0; i < size; ++i) {
XdsLocalityInfo locality_info;
grpc_error* error = LocalityParse(endpoints[i], &locality_info);
if (error != GRPC_ERROR_NONE) return error;
update->locality_list.push_back(std::move(locality_info));
}
return true;
// The locality list is sorted here into deterministic order so that it's
// easier to check if two locality lists contain the same set of localities.
std::sort(update->locality_list.data(),
update->locality_list.data() + update->locality_list.size(),
XdsLocalityInfo::Less());
return GRPC_ERROR_NONE;
}
bool xds_grpclb_server_equals(const xds_grpclb_server* lhs,
const xds_grpclb_server* rhs) {
return memcmp(lhs, rhs, sizeof(xds_grpclb_server)) == 0;
namespace {
void google_protobuf_Timestamp_assign(google_protobuf_Timestamp* timestamp,
const gpr_timespec& value) {
google_protobuf_Timestamp_set_seconds(timestamp, value.tv_sec);
google_protobuf_Timestamp_set_nanos(timestamp, value.tv_nsec);
}
int xds_grpclb_duration_compare(const xds_grpclb_duration* lhs,
const xds_grpclb_duration* rhs) {
GPR_ASSERT(lhs && rhs);
if (lhs->has_seconds && rhs->has_seconds) {
if (lhs->seconds < rhs->seconds) return -1;
if (lhs->seconds > rhs->seconds) return 1;
} else if (lhs->has_seconds) {
return 1;
} else if (rhs->has_seconds) {
return -1;
}
} // namespace
GPR_ASSERT(lhs->seconds == rhs->seconds);
if (lhs->has_nanos && rhs->has_nanos) {
if (lhs->nanos < rhs->nanos) return -1;
if (lhs->nanos > rhs->nanos) return 1;
} else if (lhs->has_nanos) {
return 1;
} else if (rhs->has_nanos) {
return -1;
}
xds_grpclb_request* xds_grpclb_load_report_request_create_locked(
grpc_core::XdsLbClientStats* client_stats, upb_arena* arena) {
xds_grpclb_request* req = grpc_lb_v1_LoadBalanceRequest_new(arena);
grpc_lb_v1_ClientStats* req_stats =
grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(req, arena);
google_protobuf_Timestamp_assign(
grpc_lb_v1_ClientStats_mutable_timestamp(req_stats, arena),
gpr_now(GPR_CLOCK_REALTIME));
return 0;
}
int64_t num_calls_started;
int64_t num_calls_finished;
int64_t num_calls_finished_with_client_failed_to_send;
int64_t num_calls_finished_known_received;
UniquePtr<XdsLbClientStats::DroppedCallCounts> drop_token_counts;
client_stats->GetLocked(&num_calls_started, &num_calls_finished,
&num_calls_finished_with_client_failed_to_send,
&num_calls_finished_known_received,
&drop_token_counts);
grpc_lb_v1_ClientStats_set_num_calls_started(req_stats, num_calls_started);
grpc_lb_v1_ClientStats_set_num_calls_finished(req_stats, num_calls_finished);
grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(
req_stats, num_calls_finished_with_client_failed_to_send);
grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(
req_stats, num_calls_finished_known_received);
if (drop_token_counts != nullptr) {
for (size_t i = 0; i < drop_token_counts->size(); ++i) {
XdsLbClientStats::DropTokenCount& cur = (*drop_token_counts)[i];
grpc_lb_v1_ClientStatsPerToken* cur_msg =
grpc_lb_v1_ClientStats_add_calls_finished_with_drop(req_stats, arena);
grpc_millis xds_grpclb_duration_to_millis(xds_grpclb_duration* duration_pb) {
return static_cast<grpc_millis>(
(duration_pb->has_seconds ? duration_pb->seconds : 0) * GPR_MS_PER_SEC +
(duration_pb->has_nanos ? duration_pb->nanos : 0) / GPR_NS_PER_MS);
}
const size_t token_len = strlen(cur.token.get());
char* token = reinterpret_cast<char*>(upb_arena_malloc(arena, token_len));
memcpy(token, cur.token.get(), token_len);
void xds_grpclb_initial_response_destroy(
xds_grpclb_initial_response* response) {
gpr_free(response);
grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(
cur_msg, upb_strview_make(token, token_len));
grpc_lb_v1_ClientStatsPerToken_set_num_calls(cur_msg, cur.count);
}
}
return req;
}
} // namespace grpc_core

@ -23,67 +23,100 @@
#include <grpc/slice_buffer.h>
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/ext/filters/client_channel/server_address.h"
#include "src/proto/grpc/lb/v1/load_balancer.upb.h"
#define XDS_SERVICE_NAME_MAX_LENGTH 128
namespace grpc_core {
typedef grpc_lb_v1_Server_ip_address_t xds_grpclb_ip_address;
typedef grpc_lb_v1_LoadBalanceRequest xds_grpclb_request;
typedef grpc_lb_v1_InitialLoadBalanceResponse xds_grpclb_initial_response;
typedef grpc_lb_v1_Server xds_grpclb_server;
typedef google_protobuf_Duration xds_grpclb_duration;
typedef google_protobuf_Timestamp xds_grpclb_timestamp;
typedef struct {
xds_grpclb_server** servers;
size_t num_servers;
} xds_grpclb_serverlist;
/** Create a request for a gRPC LB service under \a lb_service_name */
xds_grpclb_request* xds_grpclb_request_create(const char* lb_service_name);
xds_grpclb_request* xds_grpclb_load_report_request_create_locked(
grpc_core::XdsLbClientStats* client_stats);
/** Protocol Buffers v3-encode \a request */
grpc_slice xds_grpclb_request_encode(const xds_grpclb_request* request);
/** Destroy \a request */
void xds_grpclb_request_destroy(xds_grpclb_request* request);
/** Parse (ie, decode) the bytes in \a encoded_xds_grpclb_response as a \a
* xds_grpclb_initial_response */
xds_grpclb_initial_response* xds_grpclb_initial_response_parse(
const grpc_slice& encoded_xds_grpclb_response);
/** Parse the list of servers from an encoded \a xds_grpclb_response */
xds_grpclb_serverlist* xds_grpclb_response_parse_serverlist(
const grpc_slice& encoded_xds_grpclb_response);
/** Return a copy of \a sl. The caller is responsible for calling \a
* xds_grpclb_destroy_serverlist on the returned copy. */
xds_grpclb_serverlist* xds_grpclb_serverlist_copy(
const xds_grpclb_serverlist* sl);
bool xds_grpclb_serverlist_equals(const xds_grpclb_serverlist* lhs,
const xds_grpclb_serverlist* rhs);
bool xds_grpclb_server_equals(const xds_grpclb_server* lhs,
const xds_grpclb_server* rhs);
/** Destroy \a serverlist */
void xds_grpclb_destroy_serverlist(xds_grpclb_serverlist* serverlist);
/** Compare \a lhs against \a rhs and return 0 if \a lhs and \a rhs are equal,
* < 0 if \a lhs represents a duration shorter than \a rhs and > 0 otherwise */
int xds_grpclb_duration_compare(const xds_grpclb_duration* lhs,
const xds_grpclb_duration* rhs);
grpc_millis xds_grpclb_duration_to_millis(xds_grpclb_duration* duration_pb);
class XdsLocalityName : public RefCounted<XdsLocalityName> {
public:
struct Less {
bool operator()(const RefCountedPtr<XdsLocalityName>& lhs,
const RefCountedPtr<XdsLocalityName>& rhs) {
int cmp_result = strcmp(lhs->region_.get(), rhs->region_.get());
if (cmp_result != 0) return cmp_result < 0;
cmp_result = strcmp(lhs->zone_.get(), rhs->zone_.get());
if (cmp_result != 0) return cmp_result < 0;
return strcmp(lhs->sub_zone_.get(), rhs->sub_zone_.get()) < 0;
}
};
XdsLocalityName(UniquePtr<char> region, UniquePtr<char> zone,
UniquePtr<char> sub_zone)
: region_(std::move(region)),
zone_(std::move(zone)),
sub_zone_(std::move(sub_zone)) {}
bool operator==(const XdsLocalityName& other) const {
return strcmp(region_.get(), other.region_.get()) == 0 &&
strcmp(zone_.get(), other.zone_.get()) == 0 &&
strcmp(sub_zone_.get(), other.sub_zone_.get()) == 0;
}
const char* region() const { return region_.get(); }
const char* zone() const { return zone_.get(); }
const char* sub_zone() const { return sub_zone_.get(); }
const char* AsHumanReadableString() {
if (human_readable_string_ == nullptr) {
char* tmp;
gpr_asprintf(&tmp, "{region=\"%s\", zone=\"%s\", sub_zone=\"%s\"}",
region_.get(), zone_.get(), sub_zone_.get());
human_readable_string_.reset(tmp);
}
return human_readable_string_.get();
}
private:
UniquePtr<char> region_;
UniquePtr<char> zone_;
UniquePtr<char> sub_zone_;
UniquePtr<char> human_readable_string_;
};
struct XdsLocalityInfo {
bool operator==(const XdsLocalityInfo& other) const {
return *locality_name == *other.locality_name &&
serverlist == other.serverlist && lb_weight == other.lb_weight &&
priority == other.priority;
}
// This comparator only compares the locality names.
struct Less {
bool operator()(const XdsLocalityInfo& lhs, const XdsLocalityInfo& rhs) {
return XdsLocalityName::Less()(lhs.locality_name, rhs.locality_name);
}
};
RefCountedPtr<XdsLocalityName> locality_name;
ServerAddressList serverlist;
uint32_t lb_weight;
uint32_t priority;
};
using XdsLocalityList = InlinedVector<XdsLocalityInfo, 1>;
struct XdsUpdate {
XdsLocalityList locality_list;
// TODO(juanlishen): Pass drop_per_million when adding drop support.
};
// Creates an EDS request querying \a service_name.
grpc_slice XdsEdsRequestCreateAndEncode(const char* service_name);
// Parses the EDS response and returns the args to update locality map. If there
// is any error, the output update is invalid.
grpc_error* XdsEdsResponseDecodeAndParse(const grpc_slice& encoded_response,
XdsUpdate* update);
// TODO(juanlishen): Delete these when LRS is added.
xds_grpclb_request* xds_grpclb_load_report_request_create_locked(
grpc_core::XdsLbClientStats* client_stats, upb_arena* arena);
/** Destroy \a initial_response */
void xds_grpclb_initial_response_destroy(xds_grpclb_initial_response* response);
} // namespace grpc_core
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_LOAD_BALANCER_API_H \
*/

File diff suppressed because it is too large Load Diff

@ -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 106
#define GRPC_STATIC_MDSTR_COUNT 107
extern const grpc_core::StaticMetadataSlice
grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
/* ":path" */
@ -111,154 +111,157 @@ extern const grpc_core::StaticMetadataSlice
/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \
(grpc_static_slice_table[33])
/* "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints" */
#define GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS \
(grpc_static_slice_table[34])
/* "/grpc.health.v1.Health/Watch" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_HEALTH_DOT_V1_DOT_HEALTH_SLASH_WATCH \
(grpc_static_slice_table[34])
(grpc_static_slice_table[35])
/* "/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[35])
(grpc_static_slice_table[36])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[36])
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[37])
/* "gzip" */
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[37])
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[38])
/* "stream/gzip" */
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[38])
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[39])
/* "GET" */
#define GRPC_MDSTR_GET (grpc_static_slice_table[39])
#define GRPC_MDSTR_GET (grpc_static_slice_table[40])
/* "POST" */
#define GRPC_MDSTR_POST (grpc_static_slice_table[40])
#define GRPC_MDSTR_POST (grpc_static_slice_table[41])
/* "/" */
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[41])
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[42])
/* "/index.html" */
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[42])
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[43])
/* "http" */
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[43])
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[44])
/* "https" */
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[44])
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[45])
/* "200" */
#define GRPC_MDSTR_200 (grpc_static_slice_table[45])
#define GRPC_MDSTR_200 (grpc_static_slice_table[46])
/* "204" */
#define GRPC_MDSTR_204 (grpc_static_slice_table[46])
#define GRPC_MDSTR_204 (grpc_static_slice_table[47])
/* "206" */
#define GRPC_MDSTR_206 (grpc_static_slice_table[47])
#define GRPC_MDSTR_206 (grpc_static_slice_table[48])
/* "304" */
#define GRPC_MDSTR_304 (grpc_static_slice_table[48])
#define GRPC_MDSTR_304 (grpc_static_slice_table[49])
/* "400" */
#define GRPC_MDSTR_400 (grpc_static_slice_table[49])
#define GRPC_MDSTR_400 (grpc_static_slice_table[50])
/* "404" */
#define GRPC_MDSTR_404 (grpc_static_slice_table[50])
#define GRPC_MDSTR_404 (grpc_static_slice_table[51])
/* "500" */
#define GRPC_MDSTR_500 (grpc_static_slice_table[51])
#define GRPC_MDSTR_500 (grpc_static_slice_table[52])
/* "accept-charset" */
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[52])
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[53])
/* "gzip, deflate" */
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[53])
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[54])
/* "accept-language" */
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[54])
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[55])
/* "accept-ranges" */
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[55])
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[56])
/* "accept" */
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[56])
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[57])
/* "access-control-allow-origin" */
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[57])
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[58])
/* "age" */
#define GRPC_MDSTR_AGE (grpc_static_slice_table[58])
#define GRPC_MDSTR_AGE (grpc_static_slice_table[59])
/* "allow" */
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[59])
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[60])
/* "authorization" */
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[60])
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[61])
/* "cache-control" */
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[61])
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[62])
/* "content-disposition" */
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[62])
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[63])
/* "content-language" */
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[63])
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[64])
/* "content-length" */
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[64])
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[65])
/* "content-location" */
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[65])
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[66])
/* "content-range" */
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[66])
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[67])
/* "cookie" */
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[67])
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[68])
/* "date" */
#define GRPC_MDSTR_DATE (grpc_static_slice_table[68])
#define GRPC_MDSTR_DATE (grpc_static_slice_table[69])
/* "etag" */
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[69])
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[70])
/* "expect" */
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[70])
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[71])
/* "expires" */
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[71])
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[72])
/* "from" */
#define GRPC_MDSTR_FROM (grpc_static_slice_table[72])
#define GRPC_MDSTR_FROM (grpc_static_slice_table[73])
/* "if-match" */
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[73])
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[74])
/* "if-modified-since" */
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[74])
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[75])
/* "if-none-match" */
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[75])
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[76])
/* "if-range" */
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[76])
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[77])
/* "if-unmodified-since" */
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[77])
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[78])
/* "last-modified" */
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[78])
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[79])
/* "link" */
#define GRPC_MDSTR_LINK (grpc_static_slice_table[79])
#define GRPC_MDSTR_LINK (grpc_static_slice_table[80])
/* "location" */
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[80])
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[81])
/* "max-forwards" */
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[81])
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[82])
/* "proxy-authenticate" */
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[82])
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[83])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[83])
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[84])
/* "range" */
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[84])
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[85])
/* "referer" */
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[85])
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[86])
/* "refresh" */
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[86])
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[87])
/* "retry-after" */
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[87])
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[88])
/* "server" */
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[88])
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[89])
/* "set-cookie" */
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[89])
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[90])
/* "strict-transport-security" */
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[90])
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[91])
/* "transfer-encoding" */
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[91])
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[92])
/* "vary" */
#define GRPC_MDSTR_VARY (grpc_static_slice_table[92])
#define GRPC_MDSTR_VARY (grpc_static_slice_table[93])
/* "via" */
#define GRPC_MDSTR_VIA (grpc_static_slice_table[93])
#define GRPC_MDSTR_VIA (grpc_static_slice_table[94])
/* "www-authenticate" */
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[94])
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[95])
/* "0" */
#define GRPC_MDSTR_0 (grpc_static_slice_table[95])
#define GRPC_MDSTR_0 (grpc_static_slice_table[96])
/* "identity" */
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[96])
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[97])
/* "trailers" */
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[97])
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[98])
/* "application/grpc" */
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[98])
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[99])
/* "grpc" */
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[99])
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[100])
/* "PUT" */
#define GRPC_MDSTR_PUT (grpc_static_slice_table[100])
#define GRPC_MDSTR_PUT (grpc_static_slice_table[101])
/* "lb-cost-bin" */
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[101])
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[102])
/* "identity,deflate" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[102])
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[103])
/* "identity,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[103])
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[104])
/* "deflate,gzip" */
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[104])
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[105])
/* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(grpc_static_slice_table[105])
(grpc_static_slice_table[106])
namespace grpc_core {
struct StaticSliceRefcount;

@ -0,0 +1,31 @@
# Copyright 2017 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.
licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_package", "grpc_proto_library")
grpc_package(
name = "lb",
visibility = "public",
)
grpc_proto_library(
name = "xds_for_test_proto",
srcs = [
"xds_for_test.proto",
],
has_services = True,
well_known_protos = True,
)

@ -0,0 +1,553 @@
// 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.
// This file contains the xds protocol and its dependency. It can't be used by
// the gRPC library; otherwise there can be duplicate definition problems if
// users depend on both gRPC and Envoy. It can only be used by gRPC tests.
//
// TODO(juanlishen): It's a workaround and should be removed once we have a
// clean solution to use protobuf and external proto files.
syntax = "proto3";
package envoy.api.v2;
import "google/protobuf/any.proto";
message UInt32Value {
// The uint32 value.
uint32 value = 1;
}
message Status {
// The status code, which should be an enum value of [google.rpc.Code][].
int32 code = 1;
// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][] field, or localized by the client.
string message = 2;
// A list of messages that carry the error details. There is a common set of
// message types for APIs to use.
repeated google.protobuf.Any details = 3;
}
// `Struct` represents a structured data value, consisting of fields
// which map to dynamically typed values. In some languages, `Struct`
// might be supported by a native representation. For example, in
// scripting languages like JS a struct is represented as an
// object. The details of that representation are described together
// with the proto support for the language.
//
// The JSON representation for `Struct` is JSON object.
message Struct {
// Unordered map of dynamically typed values.
map<string, Value> fields = 1;
}
// `Value` represents a dynamically typed value which can be either
// null, a number, a string, a boolean, a recursive struct value, or a
// list of values. A producer of value is expected to set one of that
// variants, absence of any variant indicates an error.
//
// The JSON representation for `Value` is JSON value.
message Value {
// The kind of value.
oneof kind {
// Represents a null value.
NullValue null_value = 1;
// Represents a double value.
double number_value = 2;
// Represents a string value.
string string_value = 3;
// Represents a boolean value.
bool bool_value = 4;
// Represents a structured value.
Struct struct_value = 5;
// Represents a repeated `Value`.
ListValue list_value = 6;
}
}
// `NullValue` is a singleton enumeration to represent the null value for the
// `Value` type union.
//
// The JSON representation for `NullValue` is JSON `null`.
enum NullValue {
// Null value.
NULL_VALUE = 0;
}
// `ListValue` is a wrapper around a repeated field of values.
//
// The JSON representation for `ListValue` is JSON array.
message ListValue {
// Repeated field of dynamically typed values.
repeated Value values = 1;
}
///////////////////////////////////////////////////////////////////////////////
// Identifies location of where either Envoy runs or where upstream hosts run.
message Locality {
// Region this :ref:`zone <envoy_api_field_core.Locality.zone>` belongs to.
string region = 1;
// Defines the local service zone where Envoy is running. Though optional, it
// should be set if discovery service routing is used and the discovery
// service exposes :ref:`zone data <envoy_api_field_endpoint.LocalityLbEndpoints.locality>`,
// either in this message or via :option:`--service-zone`. The meaning of zone
// is context dependent, e.g. `Availability Zone (AZ)
// <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html>`_
// on AWS, `Zone <https://cloud.google.com/compute/docs/regions-zones/>`_ on
// GCP, etc.
string zone = 2;
// When used for locality of upstream hosts, this field further splits zone
// into smaller chunks of sub-zones so they can be load balanced
// independently.
string sub_zone = 3;
}
// Identifies a specific Envoy instance. The node identifier is presented to the
// management server, which may use this identifier to distinguish per Envoy
// configuration for serving.
message Node {
// An opaque node identifier for the Envoy node. This also provides the local
// service node name. It should be set if any of the following features are
// used: :ref:`statsd <arch_overview_statistics>`, :ref:`CDS
// <config_cluster_manager_cds>`, and :ref:`HTTP tracing
// <arch_overview_tracing>`, either in this message or via
// :option:`--service-node`.
string id = 1;
// Defines the local service cluster name where Envoy is running. Though
// optional, it should be set if any of the following features are used:
// :ref:`statsd <arch_overview_statistics>`, :ref:`health check cluster
// verification <envoy_api_field_core.HealthCheck.HttpHealthCheck.service_name>`,
// :ref:`runtime override directory <envoy_api_msg_config.bootstrap.v2.Runtime>`,
// :ref:`user agent addition
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.add_user_agent>`,
// :ref:`HTTP global rate limiting <config_http_filters_rate_limit>`,
// :ref:`CDS <config_cluster_manager_cds>`, and :ref:`HTTP tracing
// <arch_overview_tracing>`, either in this message or via
// :option:`--service-cluster`.
string cluster = 2;
// Opaque metadata extending the node identifier. Envoy will pass this
// directly to the management server.
Struct metadata = 3;
// Locality specifying where the Envoy instance is running.
Locality locality = 4;
// This is motivated by informing a management server during canary which
// version of Envoy is being tested in a heterogeneous fleet. This will be set
// by Envoy in management server RPCs.
string build_version = 5;
}
///////////////////////////////////////////////////////////////////////////////
// A DiscoveryRequest requests a set of versioned resources of the same type for
// a given Envoy node on some API.
message DiscoveryRequest {
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request. It is expected that no new request is sent after a
// response is received until the Envoy instance is ready to ACK/NACK the new
// configuration. ACK/NACK takes place by returning the new API config version
// as applied or the previous API config version respectively. Each type_url
// (see below) has an independent version associated with it.
string version_info = 1;
// The node making the request.
Node node = 2;
// List of resources to subscribe to, e.g. list of cluster names or a route
// configuration name. If this is empty, all resources for the API are
// returned. LDS/CDS expect empty resource_names, since this is global
// discovery for the Envoy instance. The LDS and CDS responses will then imply
// a number of resources that need to be fetched via EDS/RDS, which will be
// explicitly enumerated in resource_names.
repeated string resource_names = 3;
// Type of the resource that is being requested, e.g.
// "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit
// in requests made via singleton xDS APIs such as CDS, LDS, etc. but is
// required for ADS.
string type_url = 4;
// nonce corresponding to DiscoveryResponse being ACK/NACKed. See above
// discussion on version_info and the DiscoveryResponse nonce comment. This
// may be empty if no nonce is available, e.g. at startup or for non-stream
// xDS implementations.
string response_nonce = 5;
// This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
// failed to update configuration. The *message* field in *error_details* provides the Envoy
// internal exception related to the failure. It is only intended for consumption during manual
// debugging, the string provided is not guaranteed to be stable across Envoy versions.
Status error_detail = 6;
}
message DiscoveryResponse {
// The version of the response data.
string version_info = 1;
// The response resources. These resources are typed and depend on the API being called.
repeated google.protobuf.Any resources = 2;
// [#not-implemented-hide:]
// Canary is used to support two Envoy command line flags:
//
// * --terminate-on-canary-transition-failure. When set, Envoy is able to
// terminate if it detects that configuration is stuck at canary. Consider
// this example sequence of updates:
// - Management server applies a canary config successfully.
// - Management server rolls back to a production config.
// - Envoy rejects the new production config.
// Since there is no sensible way to continue receiving configuration
// updates, Envoy will then terminate and apply production config from a
// clean slate.
// * --dry-run-canary. When set, a canary response will never be applied, only
// validated via a dry run.
bool canary = 3;
// Type URL for resources. This must be consistent with the type_url in the
// Any messages for resources if resources is non-empty. This effectively
// identifies the xDS API when muxing over ADS.
string type_url = 4;
// For gRPC based subscriptions, the nonce provides a way to explicitly ack a
// specific DiscoveryResponse in a following DiscoveryRequest. Additional
// messages may have been sent by Envoy to the management server for the
// previous version on the stream prior to this DiscoveryResponse, that were
// unprocessed at response send time. The nonce allows the management server
// to ignore any further DiscoveryRequests for the previous version until a
// DiscoveryRequest bearing the nonce. The nonce is optional and is not
// required for non-stream based xDS implementations.
string nonce = 5;
}
///////////////////////////////////////////////////////////////////////////////
message Pipe {
// Unix Domain Socket path. On Linux, paths starting with '@' will use the
// abstract namespace. The starting '@' is replaced by a null byte by Envoy.
// Paths starting with '@' will result in an error in environments other than
// Linux.
string path = 1;
}
message SocketAddress {
enum Protocol {
TCP = 0;
// [#not-implemented-hide:]
UDP = 1;
}
Protocol protocol = 1;
// The address for this socket. :ref:`Listeners <config_listeners>` will bind
// to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
// to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
// It is possible to distinguish a Listener address via the prefix/suffix matching
// in :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>`.] When used
// within an upstream :ref:`BindConfig <envoy_api_msg_core.BindConfig>`, the address
// controls the source address of outbound connections. For :ref:`clusters
// <envoy_api_msg_Cluster>`, the cluster type determines whether the
// address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS
// (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized
// via :ref:`resolver_name <envoy_api_field_core.SocketAddress.resolver_name>`.
string address = 2;
oneof port_specifier {
uint32 port_value = 3;
// This is only valid if :ref:`resolver_name
// <envoy_api_field_core.SocketAddress.resolver_name>` is specified below and the
// named resolver is capable of named port resolution.
string named_port = 4;
}
// The name of the resolver. This must have been registered with Envoy. If this is
// empty, a context dependent default applies. If address is a hostname this
// should be set for resolution other than DNS. If the address is a concrete
// IP address, no resolution will occur.
string resolver_name = 5;
// When binding to an IPv6 address above, this enables `IPv4 compatibity
// <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
// allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
// IPv6 space as ``::FFFF:<IPv4-address>``.
bool ipv4_compat = 6;
}
// Addresses specify either a logical or physical address and port, which are
// used to tell Envoy where to bind/listen, connect to upstream and find
// management servers.
message Address {
oneof address {
SocketAddress socket_address = 1;
Pipe pipe = 2;
}
}
///////////////////////////////////////////////////////////////////////////////
message Metadata {
// Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.*
// namespace is reserved for Envoy's built-in filters.
map<string, Struct> filter_metadata = 1;
}
///////////////////////////////////////////////////////////////////////////////
// Endpoint health status.
enum HealthStatus {
// The health status is not known. This is interpreted by Envoy as *HEALTHY*.
UNKNOWN = 0;
// Healthy.
HEALTHY = 1;
// Unhealthy.
UNHEALTHY = 2;
// Connection draining in progress. E.g.,
// `<https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/>`_
// or
// `<https://cloud.google.com/compute/docs/load-balancing/enabling-connection-draining>`_.
// This is interpreted by Envoy as *UNHEALTHY*.
DRAINING = 3;
// Health check timed out. This is part of HDS and is interpreted by Envoy as
// *UNHEALTHY*.
TIMEOUT = 4;
}
///////////////////////////////////////////////////////////////////////////////
// Upstream host identifier.
message Endpoint {
// The upstream host address.
//
// .. attention::
//
// The form of host address depends on the given cluster type. For STATIC or EDS,
// it is expected to be a direct IP address (or something resolvable by the
// specified :ref:`resolver <envoy_api_field_core.SocketAddress.resolver_name>`
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
Address address = 1;
// The optional health check configuration.
message HealthCheckConfig {
// Optional alternative health check port value.
//
// By default the health check address port of an upstream host is the same
// as the host's serving address port. This provides an alternative health
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1;
}
// The optional health check configuration is used as configuration for the
// health checker to contact the health checked host.
//
// .. attention::
//
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
}
// An Endpoint that Envoy can route traffic to.
message LbEndpoint {
// Upstream host identifier
Endpoint endpoint = 1;
// Optional health status when known and supplied by EDS server.
HealthStatus health_status = 2;
// The endpoint metadata specifies values that may be used by the load
// balancer to select endpoints in a cluster for a given request. The filter
// name should be specified as *envoy.lb*. An example boolean key-value pair
// is *canary*, providing the optional canary status of the upstream host.
// This may be matched against in a route's
// :ref:`RouteAction <envoy_api_msg_route.RouteAction>` metadata_match field
// to subset the endpoints considered in cluster load balancing.
Metadata metadata = 3;
// The optional load balancing weight of the upstream host, in the range 1 -
// 128. Envoy uses the load balancing weight in some of the built in load
// balancers. The load balancing weight for an endpoint is divided by the sum
// of the weights of all endpoints in the endpoint's locality to produce a
// percentage of traffic for the endpoint. This percentage is then further
// weighted by the endpoint's locality's load balancing weight from
// LocalityLbEndpoints. If unspecified, each host is presumed to have equal
// weight in a locality.
//
// .. attention::
//
// The limit of 128 is somewhat arbitrary, but is applied due to performance
// concerns with the current implementation and can be removed when
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed.
UInt32Value load_balancing_weight = 4;
}
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but this is
// generally only done if the different groups need to have different load
// balancing weights or different priorities.
message LocalityLbEndpoints {
// Identifies location of where the upstream hosts run.
Locality locality = 1;
// The group of endpoints belonging to the locality specified.
repeated LbEndpoint lb_endpoints = 2;
// Optional: Per priority/region/zone/sub_zone weight - range 1-128. The load
// balancing weight for a locality is divided by the sum of the weights of all
// localities at the same priority level to produce the effective percentage
// of traffic for the locality.
//
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specificed when locality weighted load balancing is enabled, the cluster is
// assumed to have a weight of 1.
//
// .. attention::
//
// The limit of 128 is somewhat arbitrary, but is applied due to performance
// concerns with the current implementation and can be removed when
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed.
UInt32Value load_balancing_weight = 3;
// Optional: the priority for this LocalityLbEndpoints. If unspecified this will
// default to the highest priority (0).
//
// Under usual circumstances, Envoy will only select endpoints for the highest
// priority (0). In the event all endpoints for a particular priority are
// unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
// next highest priority group.
//
// Priorities should range from 0 (highest) to N (lowest) without skipping.
uint32 priority = 5;
}
///////////////////////////////////////////////////////////////////////////////
message FractionalPercent {
// Specifies the numerator. Defaults to 0.
uint32 numerator = 1;
// Fraction percentages support several fixed denominator values.
enum DenominatorType {
// 100.
//
// **Example**: 1/100 = 1%.
HUNDRED = 0;
// 10,000.
//
// **Example**: 1/10000 = 0.01%.
TEN_THOUSAND = 1;
// 1,000,000.
//
// **Example**: 1/1000000 = 0.0001%.
MILLION = 2;
}
// Specifies the denominator. If the denominator specified is less than the numerator, the final
// fractional percentage is capped at 1 (100%).
DenominatorType denominator = 2;
}
///////////////////////////////////////////////////////////////////////////////
// [#protodoc-title: EDS]
// Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_eds>`
service EndpointDiscoveryService {
// The resource_names field in DiscoveryRequest specifies a list of clusters
// to subscribe to updates for.
rpc StreamEndpoints(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
}
}
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. For a given cluster, the
// effective weight of a host is its load_balancing_weight multiplied by the
// load_balancing_weight of its Locality.
message ClusterLoadAssignment {
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
// in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_Cluster.EdsClusterConfig>`.
string cluster_name = 1;
// List of endpoints to load balance to.
repeated LocalityLbEndpoints endpoints = 2;
// Load balancing policy settings.
message Policy {
reserved 1;
message DropOverload {
// Identifier for the policy specifying the drop.
string category = 1;
// Percentage of traffic that should be dropped for the category.
FractionalPercent drop_percentage = 2;
}
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%.
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
UInt32Value overprovisioning_factor = 3;
}
// Load balancing policy settings.
Policy policy = 4;
}

@ -374,6 +374,8 @@ CORE_SOURCE_FILES = [
'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',
@ -381,14 +383,32 @@ CORE_SOURCE_FILES = [
'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',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'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/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',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c',
'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c',
'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c',
'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/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',

@ -33,6 +33,7 @@
"\x1Egrpc.max_request_message_bytes"
"\x1Fgrpc.max_response_message_bytes"
"$/grpc.lb.v1.LoadBalancer/BalanceLoad"
"6/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints"
"\x1C/grpc.health.v1.Health/Watch"
"P/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources"
"\x07deflate"

@ -89,6 +89,7 @@ grpc_cc_test(
external_deps = [
"gtest",
],
tags = ["no_windows"],
deps = [
":test_service_impl",
"//:gpr",
@ -99,7 +100,6 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -492,6 +492,7 @@ grpc_cc_test(
"//:grpc++",
"//:grpc_resolver_fake",
"//src/proto/grpc/lb/v1:load_balancer_proto",
"//src/proto/grpc/lb/v2:xds_for_test_proto",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
"//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
@ -658,6 +659,7 @@ grpc_cc_test(
external_deps = [
"gtest",
],
tags = ["no_windows"],
deps = [
"//:gpr",
"//:grpc",
@ -668,7 +670,6 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -718,8 +719,8 @@ grpc_cc_test(
],
deps = [
":test_service_impl",
"//:grpc",
"//:gpr",
"//:grpc",
"//:grpc++",
"//src/proto/grpc/testing:echo_messages_proto",
"//src/proto/grpc/testing:echo_proto",
@ -746,4 +747,3 @@ grpc_cc_test(
"//test/cpp/util:test_util",
],
)

@ -48,7 +48,7 @@
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
#include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h"
#include "src/proto/grpc/lb/v2/xds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include <gmock/gmock.h>
@ -71,16 +71,23 @@
// 2) the retry timer is active. Again, the weak reference it holds should
// prevent a premature call to \a glb_destroy.
using std::chrono::system_clock;
using grpc::lb::v1::LoadBalanceRequest;
using grpc::lb::v1::LoadBalanceResponse;
using grpc::lb::v1::LoadBalancer;
namespace grpc {
namespace testing {
namespace {
using std::chrono::system_clock;
using ::envoy::api::v2::ClusterLoadAssignment;
using ::envoy::api::v2::DiscoveryRequest;
using ::envoy::api::v2::DiscoveryResponse;
using ::envoy::api::v2::EndpointDiscoveryService;
constexpr char kEdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.ClusterLoadAssignment";
constexpr char kDefaultLocalityRegion[] = "xds_default_locality_region";
constexpr char kDefaultLocalityZone[] = "xds_default_locality_zone";
constexpr char kDefaultLocalitySubzone[] = "xds_default_locality_subzone";
template <typename ServiceType>
class CountedService : public ServiceType {
public:
@ -118,7 +125,7 @@ class CountedService : public ServiceType {
};
using BackendService = CountedService<TestServiceImpl>;
using BalancerService = CountedService<LoadBalancer::Service>;
using BalancerService = CountedService<EndpointDiscoveryService::Service>;
const char g_kCallCredsMdKey[] = "Balancer should not ...";
const char g_kCallCredsMdValue[] = "... receive me";
@ -161,12 +168,6 @@ class BackendServiceImpl : public BackendService {
std::set<grpc::string> clients_;
};
grpc::string Ip4ToPackedString(const char* ip_str) {
struct in_addr ip4;
GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1);
return grpc::string(reinterpret_cast<const char*>(&ip4), sizeof(ip4));
}
struct ClientStats {
size_t num_calls_started = 0;
size_t num_calls_finished = 0;
@ -198,16 +199,16 @@ struct ClientStats {
class BalancerServiceImpl : public BalancerService {
public:
using Stream = ServerReaderWriter<LoadBalanceResponse, LoadBalanceRequest>;
using ResponseDelayPair = std::pair<LoadBalanceResponse, int>;
using Stream = ServerReaderWriter<DiscoveryResponse, DiscoveryRequest>;
using ResponseDelayPair = std::pair<DiscoveryResponse, int>;
explicit BalancerServiceImpl(int client_load_reporting_interval_seconds)
: client_load_reporting_interval_seconds_(
client_load_reporting_interval_seconds) {}
Status BalanceLoad(ServerContext* context, Stream* stream) override {
Status StreamEndpoints(ServerContext* context, Stream* stream) override {
// TODO(juanlishen): Clean up the scoping.
gpr_log(GPR_INFO, "LB[%p]: BalanceLoad", this);
gpr_log(GPR_INFO, "LB[%p]: EDS starts", this);
{
grpc::internal::MutexLock lock(&mu_);
if (serverlist_done_) goto done;
@ -216,24 +217,12 @@ class BalancerServiceImpl : public BalancerService {
// Balancer shouldn't receive the call credentials metadata.
EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey),
context->client_metadata().end());
LoadBalanceRequest request;
DiscoveryRequest request;
std::vector<ResponseDelayPair> responses_and_delays;
if (!stream->Read(&request)) {
goto done;
}
if (!stream->Read(&request)) goto done;
IncreaseRequestCount();
gpr_log(GPR_INFO, "LB[%p]: received initial message '%s'", this,
request.DebugString().c_str());
{
LoadBalanceResponse initial_response;
initial_response.mutable_initial_response()
->mutable_client_stats_report_interval()
->set_seconds(client_load_reporting_interval_seconds_);
stream->Write(initial_response);
}
{
grpc::internal::MutexLock lock(&mu_);
responses_and_delays = responses_and_delays_;
@ -246,34 +235,8 @@ class BalancerServiceImpl : public BalancerService {
grpc::internal::MutexLock lock(&mu_);
serverlist_cond_.WaitUntil(&mu_, [this] { return serverlist_done_; });
}
if (client_load_reporting_interval_seconds_ > 0) {
request.Clear();
if (stream->Read(&request)) {
gpr_log(GPR_INFO, "LB[%p]: received client load report message '%s'",
this, request.DebugString().c_str());
GPR_ASSERT(request.has_client_stats());
// We need to acquire the lock here in order to prevent the notify_one
// below from firing before its corresponding wait is executed.
grpc::internal::MutexLock lock(&mu_);
client_stats_.num_calls_started +=
request.client_stats().num_calls_started();
client_stats_.num_calls_finished +=
request.client_stats().num_calls_finished();
client_stats_.num_calls_finished_with_client_failed_to_send +=
request.client_stats()
.num_calls_finished_with_client_failed_to_send();
client_stats_.num_calls_finished_known_received +=
request.client_stats().num_calls_finished_known_received();
for (const auto& drop_token_count :
request.client_stats().calls_finished_with_drop()) {
client_stats_
.drop_token_counts[drop_token_count.load_balance_token()] +=
drop_token_count.num_calls();
}
load_report_ready_ = true;
load_report_cond_.Signal();
}
// TODO(juanlishen): Use LRS to receive load report.
}
}
done:
@ -281,7 +244,7 @@ class BalancerServiceImpl : public BalancerService {
return Status::OK;
}
void add_response(const LoadBalanceResponse& response, int send_after_ms) {
void add_response(const DiscoveryResponse& response, int send_after_ms) {
grpc::internal::MutexLock lock(&mu_);
responses_and_delays_.push_back(std::make_pair(response, send_after_ms));
}
@ -290,41 +253,34 @@ class BalancerServiceImpl : public BalancerService {
grpc::internal::MutexLock lock(&mu_);
NotifyDoneWithServerlistsLocked();
responses_and_delays_.clear();
client_stats_.Reset();
gpr_log(GPR_INFO, "LB[%p]: shut down", this);
}
static LoadBalanceResponse BuildResponseForBackends(
static DiscoveryResponse BuildResponseForBackends(
const std::vector<int>& backend_ports,
const std::map<grpc::string, size_t>& drop_token_counts) {
LoadBalanceResponse response;
for (const auto& drop_token_count : drop_token_counts) {
for (size_t i = 0; i < drop_token_count.second; ++i) {
auto* server = response.mutable_server_list()->add_servers();
server->set_drop(true);
server->set_load_balance_token(drop_token_count.first);
}
}
ClusterLoadAssignment assignment;
assignment.set_cluster_name("service name");
auto* endpoints = assignment.add_endpoints();
endpoints->mutable_load_balancing_weight()->set_value(3);
endpoints->set_priority(0);
endpoints->mutable_locality()->set_region(kDefaultLocalityRegion);
endpoints->mutable_locality()->set_zone(kDefaultLocalityZone);
endpoints->mutable_locality()->set_sub_zone(kDefaultLocalitySubzone);
for (const int& backend_port : backend_ports) {
auto* server = response.mutable_server_list()->add_servers();
server->set_ip_address(Ip4ToPackedString("127.0.0.1"));
server->set_port(backend_port);
static int token_count = 0;
char* token;
gpr_asprintf(&token, "token%03d", ++token_count);
server->set_load_balance_token(token);
gpr_free(token);
auto* lb_endpoints = endpoints->add_lb_endpoints();
auto* endpoint = lb_endpoints->mutable_endpoint();
auto* address = endpoint->mutable_address();
auto* socket_address = address->mutable_socket_address();
socket_address->set_address("127.0.0.1");
socket_address->set_port_value(backend_port);
}
DiscoveryResponse response;
response.set_type_url(kEdsTypeUrl);
response.add_resources()->PackFrom(assignment);
return response;
}
const ClientStats& WaitForLoadReport() {
grpc::internal::MutexLock lock(&mu_);
load_report_cond_.WaitUntil(&mu_, [this] { return load_report_ready_; });
load_report_ready_ = false;
return client_stats_;
}
void NotifyDoneWithServerlists() {
grpc::internal::MutexLock lock(&mu_);
NotifyDoneWithServerlistsLocked();
@ -338,7 +294,7 @@ class BalancerServiceImpl : public BalancerService {
}
private:
void SendResponse(Stream* stream, const LoadBalanceResponse& response,
void SendResponse(Stream* stream, const DiscoveryResponse& response,
int delay_ms) {
gpr_log(GPR_INFO, "LB[%p]: sleeping for %d ms...", this, delay_ms);
if (delay_ms > 0) {
@ -353,11 +309,8 @@ class BalancerServiceImpl : public BalancerService {
const int client_load_reporting_interval_seconds_;
std::vector<ResponseDelayPair> responses_and_delays_;
grpc::internal::Mutex mu_;
grpc::internal::CondVar load_report_cond_;
bool load_report_ready_ = false;
grpc::internal::CondVar serverlist_cond_;
bool serverlist_done_ = false;
ClientStats client_stats_;
};
class XdsEnd2endTest : public ::testing::Test {
@ -450,9 +403,7 @@ class XdsEnd2endTest : public ::testing::Test {
ClientStats WaitForLoadReports() {
ClientStats client_stats;
for (auto& balancer : balancers_) {
client_stats += balancer->service_.WaitForLoadReport();
}
// TODO(juanlishen): Wait in LRS.
return client_stats;
}
@ -597,8 +548,7 @@ class XdsEnd2endTest : public ::testing::Test {
return backend_ports;
}
void ScheduleResponseForBalancer(size_t i,
const LoadBalanceResponse& response,
void ScheduleResponseForBalancer(size_t i, const DiscoveryResponse& response,
int delay_ms) {
balancers_[i]->service_.add_response(response, delay_ms);
}
@ -820,7 +770,8 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) {
const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor();
const int kCallDeadlineMs = kServerlistDelayMs * 2;
// First response is an empty serverlist, sent right away.
ScheduleResponseForBalancer(0, LoadBalanceResponse(), 0);
ScheduleResponseForBalancer(
0, BalancerServiceImpl::BuildResponseForBackends({}, {}), 0);
// Send non-empty serverlist only after kServerlistDelayMs
ScheduleResponseForBalancer(
0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),

@ -63,6 +63,7 @@ CONFIG = [
'grpc.max_response_message_bytes',
# well known method names
'/grpc.lb.v1.LoadBalancer/BalanceLoad',
'/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints',
'/grpc.health.v1.Health/Watch',
'/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources',
# compression algorithm names

@ -42,32 +42,6 @@ make -j 8
# back to the root directory
popd
#
# Checks for load_balancer.proto
#
readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1'
# nanopb-compile the proto to a temp location
./tools/codegen/core/gen_nano_proto.sh \
src/proto/grpc/lb/v1/load_balancer.proto \
"$NANOPB_TMP_OUTPUT" \
"$LOAD_BALANCER_GRPC_OUTPUT_PATH"
./tools/codegen/core/gen_nano_proto.sh \
third_party/protobuf/src/google/protobuf/duration.proto \
"$NANOPB_TMP_OUTPUT/google/protobuf" \
"$LOAD_BALANCER_GRPC_OUTPUT_PATH/google/protobuf"
./tools/codegen/core/gen_nano_proto.sh \
third_party/protobuf/src/google/protobuf/timestamp.proto \
"$NANOPB_TMP_OUTPUT/google/protobuf" \
"$LOAD_BALANCER_GRPC_OUTPUT_PATH/google/protobuf"
# compare outputs to checked compiled code
if ! diff -r "$NANOPB_TMP_OUTPUT" src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1; then
echo "Outputs differ: $NANOPB_TMP_OUTPUT vs $LOAD_BALANCER_GRPC_OUTPUT_PATH"
exit 2
fi
#
# checks for health.proto
#

@ -907,12 +907,6 @@ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
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.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \
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/lb_policy/subchannel_list.h \
@ -1064,6 +1058,48 @@ src/core/ext/transport/chttp2/transport/writing.cc \
src/core/ext/transport/inproc/inproc_plugin.cc \
src/core/ext/transport/inproc/inproc_transport.cc \
src/core/ext/transport/inproc/inproc_transport.h \
src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \
src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h \
src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \
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/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 \
src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h \
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h \
src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \
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.c \
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/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 \
src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h \
src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/eds.upb.h \
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \
src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h \
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \
src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h \
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \
src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h \
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \
src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h \
src/core/ext/upb-generated/envoy/type/percent.upb.c \
src/core/ext/upb-generated/envoy/type/percent.upb.h \
src/core/ext/upb-generated/envoy/type/range.upb.c \
src/core/ext/upb-generated/envoy/type/range.upb.h \
src/core/ext/upb-generated/gogoproto/gogo.upb.c \
src/core/ext/upb-generated/gogoproto/gogo.upb.h \
src/core/ext/upb-generated/google/api/annotations.upb.c \
src/core/ext/upb-generated/google/api/annotations.upb.h \
src/core/ext/upb-generated/google/api/http.upb.c \
src/core/ext/upb-generated/google/api/http.upb.h \
src/core/ext/upb-generated/google/protobuf/any.upb.c \
src/core/ext/upb-generated/google/protobuf/any.upb.h \
src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \
@ -1078,10 +1114,14 @@ src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \
src/core/ext/upb-generated/google/protobuf/timestamp.upb.h \
src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \
src/core/ext/upb-generated/google/protobuf/wrappers.upb.h \
src/core/ext/upb-generated/google/rpc/status.upb.c \
src/core/ext/upb-generated/google/rpc/status.upb.h \
src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \
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/validate/validate.upb.c \
src/core/ext/upb-generated/validate/validate.upb.h \
src/core/lib/README.md \
src/core/lib/avl/avl.cc \
src/core/lib/avl/avl.h \

@ -5323,9 +5323,9 @@
"grpc_test_util"
],
"headers": [
"src/proto/grpc/lb/v1/load_balancer.grpc.pb.h",
"src/proto/grpc/lb/v1/load_balancer.pb.h",
"src/proto/grpc/lb/v1/load_balancer_mock.grpc.pb.h"
"src/proto/grpc/lb/v2/xds_for_test.grpc.pb.h",
"src/proto/grpc/lb/v2/xds_for_test.pb.h",
"src/proto/grpc/lb/v2/xds_for_test_mock.grpc.pb.h"
],
"is_filegroup": false,
"language": "c++",
@ -8304,21 +8304,130 @@
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"envoy_core_upb",
"envoy_type_upb",
"google_api_upb",
"proto_gen_validate_upb"
],
"headers": [
"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/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",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h"
],
"is_filegroup": true,
"language": "c",
"name": "envoy_ads_upb",
"src": [
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/cds.upb.c",
"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/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/discovery.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/eds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c",
"src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c",
"src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h"
],
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"envoy_type_upb",
"google_api_upb",
"proto_gen_validate_upb"
],
"headers": [
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h",
"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/protocol.upb.h"
],
"is_filegroup": true,
"language": "c",
"name": "envoy_core_upb",
"src": [
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c",
"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.c",
"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/protocol.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h"
],
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"google_api_upb",
"proto_gen_validate_upb"
],
"headers": [
"src/core/ext/upb-generated/envoy/type/percent.upb.h",
"src/core/ext/upb-generated/envoy/type/range.upb.h"
],
"is_filegroup": true,
"language": "c",
"name": "envoy_type_upb",
"src": [
"src/core/ext/upb-generated/envoy/type/percent.upb.c",
"src/core/ext/upb-generated/envoy/type/percent.upb.h",
"src/core/ext/upb-generated/envoy/type/range.upb.c",
"src/core/ext/upb-generated/envoy/type/range.upb.h"
],
"third_party": false,
"type": "filegroup"
},
{
"deps": [],
"headers": [
"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/protobuf/wrappers.upb.h",
"src/core/ext/upb-generated/google/rpc/status.upb.h"
],
"is_filegroup": true,
"language": "c",
"name": "google_api_upb",
"src": [
"src/core/ext/upb-generated/google/api/annotations.upb.c",
"src/core/ext/upb-generated/google/api/annotations.upb.h",
"src/core/ext/upb-generated/google/api/http.upb.c",
"src/core/ext/upb-generated/google/api/http.upb.h",
"src/core/ext/upb-generated/google/protobuf/any.upb.c",
"src/core/ext/upb-generated/google/protobuf/any.upb.h",
"src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
@ -8332,7 +8441,9 @@
"src/core/ext/upb-generated/google/protobuf/timestamp.upb.c",
"src/core/ext/upb-generated/google/protobuf/timestamp.upb.h",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.c",
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.h"
"src/core/ext/upb-generated/google/protobuf/wrappers.upb.h",
"src/core/ext/upb-generated/google/rpc/status.upb.c",
"src/core/ext/upb-generated/google/rpc/status.upb.h"
],
"third_party": false,
"type": "filegroup"
@ -9394,12 +9505,12 @@
},
{
"deps": [
"envoy_ads_upb",
"gpr",
"grpc_base",
"grpc_client_channel",
"grpc_resolver_fake",
"grpclb_proto",
"nanopb"
"grpc_lb_upb",
"grpc_resolver_fake"
],
"headers": [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
@ -9425,13 +9536,13 @@
},
{
"deps": [
"envoy_ads_upb",
"gpr",
"grpc_base",
"grpc_client_channel",
"grpc_lb_upb",
"grpc_resolver_fake",
"grpc_secure",
"grpclb_proto",
"nanopb"
"grpc_secure"
],
"headers": [
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
@ -10198,29 +10309,6 @@
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"nanopb"
],
"headers": [
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
],
"is_filegroup": true,
"language": "c",
"name": "grpclb_proto",
"src": [
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
],
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"nanopb_headers"
@ -10248,6 +10336,26 @@
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"google_api_upb"
],
"headers": [
"src/core/ext/upb-generated/gogoproto/gogo.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.h"
],
"is_filegroup": true,
"language": "c",
"name": "proto_gen_validate_upb",
"src": [
"src/core/ext/upb-generated/gogoproto/gogo.upb.c",
"src/core/ext/upb-generated/gogoproto/gogo.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.c",
"src/core/ext/upb-generated/validate/validate.upb.h"
],
"third_party": false,
"type": "filegroup"
},
{
"deps": [
"grpc"

Loading…
Cancel
Save