Add LDS/RDS into XdsClient

pull/21335/head
Mark D. Roth 5 years ago
parent 5791495f59
commit ac7c1d20ed
  1. 22
      BUILD
  2. 22
      BUILD.gn
  3. 29
      CMakeLists.txt
  4. 43
      Makefile
  5. 23
      build.yaml
  6. 17
      config.m4
  7. 23
      config.w32
  8. 22
      gRPC-C++.podspec
  9. 33
      gRPC-Core.podspec
  10. 22
      grpc.gemspec
  11. 22
      grpc.gyp
  12. 22
      package.xml
  13. 407
      src/core/ext/filters/client_channel/xds/xds_api.cc
  14. 46
      src/core/ext/filters/client_channel/xds/xds_api.h
  15. 184
      src/core/ext/filters/client_channel/xds/xds_client.cc
  16. 28
      src/core/ext/filters/client_channel/xds/xds_client.h
  17. 103
      src/core/ext/upb-generated/envoy/api/v2/lds.upb.c
  18. 379
      src/core/ext/upb-generated/envoy/api/v2/lds.upb.h
  19. 106
      src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c
  20. 389
      src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h
  21. 35
      src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c
  22. 93
      src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h
  23. 63
      src/core/ext/upb-generated/envoy/api/v2/rds.upb.c
  24. 199
      src/core/ext/upb-generated/envoy/api/v2/rds.upb.h
  25. 731
      src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c
  26. 2711
      src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h
  27. 59
      src/core/ext/upb-generated/envoy/api/v2/srds.upb.c
  28. 134
      src/core/ext/upb-generated/envoy/api/v2/srds.upb.h
  29. 226
      src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c
  30. 725
      src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h
  31. 291
      src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c
  32. 1056
      src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h
  33. 31
      src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c
  34. 65
      src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h
  35. 47
      src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c
  36. 108
      src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h
  37. 50
      src/core/ext/upb-generated/envoy/type/matcher/string.upb.c
  38. 129
      src/core/ext/upb-generated/envoy/type/matcher/string.upb.h
  39. 10
      src/proto/grpc/testing/xds/BUILD
  40. 149
      src/proto/grpc/testing/xds/lds_rds_for_test.proto
  41. 11
      src/python/grpcio/grpc_core_dependencies.py
  42. 1
      test/cpp/end2end/BUILD
  43. 448
      test/cpp/end2end/xds_end2end_test.cc
  44. 11
      tools/codegen/core/gen_upb_api.sh
  45. 22
      tools/doxygen/Doxyfile.core.internal

22
BUILD

@ -2400,8 +2400,19 @@ grpc_cc_library(
"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/api/v2/lds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/rds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/srds.upb.c",
"src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c",
"src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c",
"src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/matcher/regex.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/string.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h",
@ -2413,8 +2424,19 @@ grpc_cc_library(
"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/api/v2/lds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/rds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/srds.upb.h",
"src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h",
"src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h",
"src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/matcher/regex.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/string.upb.h",
],
external_deps = [
"upb_lib",

@ -421,12 +421,34 @@ config("grpc_config") {
"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/api/v2/lds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/lds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/rds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/rds.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h",
"src/core/ext/upb-generated/envoy/api/v2/srds.upb.c",
"src/core/ext/upb-generated/envoy/api/v2/srds.upb.h",
"src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c",
"src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h",
"src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c",
"src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h",
"src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c",
"src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/http.upb.c",
"src/core/ext/upb-generated/envoy/type/http.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/string.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/string.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",

@ -394,6 +394,9 @@ protobuf_generate_grpc_cpp(
protobuf_generate_grpc_cpp(
src/proto/grpc/testing/xds/eds_for_test.proto
)
protobuf_generate_grpc_cpp(
src/proto/grpc/testing/xds/lds_rds_for_test.proto
)
protobuf_generate_grpc_cpp(
src/proto/grpc/testing/xds/lrs_for_test.proto
)
@ -1825,6 +1828,15 @@ add_library(grpc
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/api/v2/lds.upb.c
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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
@ -1835,6 +1847,8 @@ add_library(grpc
src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c
src/core/ext/upb-generated/envoy/type/http.upb.c
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c
src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/xds/xds.cc
@ -3320,6 +3334,15 @@ add_library(grpc_unsecure
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/api/v2/lds.upb.c
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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
@ -3330,6 +3353,8 @@ add_library(grpc_unsecure
src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c
src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c
src/core/ext/upb-generated/envoy/type/http.upb.c
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c
src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
@ -16080,6 +16105,10 @@ add_executable(xds_end2end_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/lrs_for_test.pb.h

@ -3061,6 +3061,22 @@ $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc: src/proto/grpc/tes
$(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/testing/xds/lds_rds_for_test.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: protoc_dep_error
else
$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc
$(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/testing/xds/lds_rds_for_test.grpc.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc
$(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/testing/xds/lrs_for_test.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc: protoc_dep_error
@ -4290,6 +4306,15 @@ LIBGRPC_SRC = \
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/api/v2/lds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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 \
@ -4300,6 +4325,8 @@ LIBGRPC_SRC = \
src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \
src/core/ext/upb-generated/envoy/type/http.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/xds/xds.cc \
@ -5727,6 +5754,15 @@ LIBGRPC_UNSECURE_SRC = \
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/api/v2/lds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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 \
@ -5737,6 +5773,8 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \
src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \
src/core/ext/upb-generated/envoy/type/http.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \
@ -20669,6 +20707,7 @@ XDS_END2END_TEST_SRC = \
$(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc \
test/cpp/end2end/xds_end2end_test.cc \
@ -20707,6 +20746,8 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/cds_for_test.o: $(LIBDIR)/$(CONF
$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/xds/eds_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)/src/proto/grpc/testing/xds/lds_rds_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)/src/proto/grpc/testing/xds/lrs_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
@ -20718,7 +20759,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/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/end2end/xds_end2end_test.o: $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/ads_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.cc
PUBLIC_HEADERS_MUST_BE_C89_SRC = \

@ -120,6 +120,15 @@ filegroups:
- 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/api/v2/lds.upb.h
- src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h
- src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h
- src/core/ext/upb-generated/envoy/api/v2/rds.upb.h
- src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h
- src/core/ext/upb-generated/envoy/api/v2/srds.upb.h
- src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h
- src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h
- src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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:
@ -132,6 +141,15 @@ filegroups:
- 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/api/v2/lds.upb.c
- src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c
- src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c
- src/core/ext/upb-generated/envoy/api/v2/rds.upb.c
- src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c
- src/core/ext/upb-generated/envoy/api/v2/srds.upb.c
- src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c
- src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c
- src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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:
@ -170,10 +188,14 @@ filegroups:
- name: envoy_type_upb
headers:
- src/core/ext/upb-generated/envoy/type/http.upb.h
- src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h
- src/core/ext/upb-generated/envoy/type/matcher/string.upb.h
- 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/http.upb.c
- src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c
- src/core/ext/upb-generated/envoy/type/matcher/string.upb.c
- src/core/ext/upb-generated/envoy/type/percent.upb.c
- src/core/ext/upb-generated/envoy/type/range.upb.c
uses:
@ -6088,6 +6110,7 @@ targets:
- src/proto/grpc/testing/xds/ads_for_test.proto
- src/proto/grpc/testing/xds/cds_for_test.proto
- src/proto/grpc/testing/xds/eds_for_test.proto
- src/proto/grpc/testing/xds/lds_rds_for_test.proto
- src/proto/grpc/testing/xds/lrs_for_test.proto
- test/cpp/end2end/xds_end2end_test.cc
deps:

@ -155,9 +155,20 @@ if test "$PHP_GRPC" != "no"; then
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/api/v2/lds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/http.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/string.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 \
@ -803,9 +814,15 @@ if test "$PHP_GRPC" != "no"; then
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/api/v2/listener)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/api/v2/route)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/envoy/config/listener/v2)
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/envoy/type/matcher)
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)

@ -124,9 +124,20 @@ if (PHP_GRPC != "no") {
"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\\api\\v2\\lds.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\udp_listener_config.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\rds.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\api\\v2\\srds.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2\\accesslog.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2\\http_connection_manager.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\config\\listener\\v2\\api_listener.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\\type\\http.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\regex.upb.c " +
"src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\string.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 " +
@ -810,12 +821,24 @@ if (PHP_GRPC != "no") {
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\\api\\v2\\listener");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\listener");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\envoy\\config\\listener\\v2");
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\\envoy\\type\\matcher");
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");

@ -315,9 +315,20 @@ Pod::Spec.new do |s|
'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/api/v2/lds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/http.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/string.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',
@ -736,9 +747,20 @@ Pod::Spec.new do |s|
'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/api/v2/lds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/http.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/string.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',

@ -390,12 +390,34 @@ Pod::Spec.new do |s|
'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/api/v2/lds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/http.upb.c',
'src/core/ext/upb-generated/envoy/type/http.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/string.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',
@ -1052,9 +1074,20 @@ Pod::Spec.new do |s|
'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/api/v2/lds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/http.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h',
'src/core/ext/upb-generated/envoy/type/matcher/string.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',

@ -313,12 +313,34 @@ Gem::Specification.new do |s|
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.c )
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/api/v2/lds.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/lds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/rds.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/rds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/srds.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/api/v2/srds.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h )
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/discovery/v2/ads.upb.h )
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/service/load_stats/v2/lrs.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/http.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/type/http.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/string.upb.c )
s.files += %w( src/core/ext/upb-generated/envoy/type/matcher/string.upb.h )
s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.c )
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.c )

@ -832,6 +832,15 @@
'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/api/v2/lds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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',
@ -842,6 +851,8 @@
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c',
'src/core/ext/upb-generated/envoy/type/http.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/xds/xds.cc',
@ -1677,6 +1688,15 @@
'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/api/v2/lds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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',
@ -1687,6 +1707,8 @@
'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c',
'src/core/ext/upb-generated/envoy/type/http.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/string.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/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',

@ -296,12 +296,34 @@
<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.c" 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/api/v2/lds.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/lds.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/rds.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/rds.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/srds.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/api/v2/srds.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h" 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/discovery/v2/ads.upb.h" 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/service/load_stats/v2/lrs.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/http.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/http.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/matcher/string.upb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/matcher/string.upb.h" 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/percent.upb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/upb-generated/envoy/type/range.upb.c" role="src" />

@ -19,6 +19,7 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <cctype>
#include <grpc/impl/codegen/log.h>
#include <grpc/support/alloc.h>
@ -38,6 +39,11 @@
#include "envoy/api/v2/eds.upb.h"
#include "envoy/api/v2/endpoint/endpoint.upb.h"
#include "envoy/api/v2/endpoint/load_report.upb.h"
#include "envoy/api/v2/lds.upb.h"
#include "envoy/api/v2/rds.upb.h"
#include "envoy/api/v2/route/route.upb.h"
#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h"
#include "envoy/config/listener/v2/api_listener.upb.h"
#include "envoy/service/load_stats/v2/lrs.upb.h"
#include "envoy/type/percent.upb.h"
#include "google/protobuf/any.upb.h"
@ -225,6 +231,117 @@ grpc_slice XdsUnsupportedTypeNackRequestCreateAndEncode(
return grpc_slice_from_copied_buffer(output, output_length);
}
grpc_slice XdsLdsRequestCreateAndEncode(const std::string& server_name,
const XdsBootstrap::Node* node,
const char* build_version,
const std::string& version,
const std::string& nonce,
grpc_error* error) {
upb::Arena arena;
// Create a request.
envoy_api_v2_DiscoveryRequest* request =
envoy_api_v2_DiscoveryRequest_new(arena.ptr());
// Set version_info.
if (!version.empty()) {
envoy_api_v2_DiscoveryRequest_set_version_info(
request, upb_strview_makez(version.c_str()));
}
// Populate node.
if (build_version != nullptr) {
envoy_api_v2_core_Node* node_msg =
envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr());
PopulateNode(arena.ptr(), node, build_version, node_msg);
}
// Add resource_name.
envoy_api_v2_DiscoveryRequest_add_resource_names(
request, upb_strview_make(server_name.data(), server_name.size()),
arena.ptr());
// Set type_url.
envoy_api_v2_DiscoveryRequest_set_type_url(request,
upb_strview_makez(kLdsTypeUrl));
// Set nonce.
if (!nonce.empty()) {
envoy_api_v2_DiscoveryRequest_set_response_nonce(
request, upb_strview_makez(nonce.c_str()));
}
// Set error_detail if it's a NACK.
if (error != GRPC_ERROR_NONE) {
grpc_slice error_description_slice;
GPR_ASSERT(grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION,
&error_description_slice));
upb_strview error_description_strview =
upb_strview_make(reinterpret_cast<const char*>(
GPR_SLICE_START_PTR(error_description_slice)),
GPR_SLICE_LENGTH(error_description_slice));
google_rpc_Status* error_detail =
envoy_api_v2_DiscoveryRequest_mutable_error_detail(request,
arena.ptr());
google_rpc_Status_set_message(error_detail, error_description_strview);
GRPC_ERROR_UNREF(error);
}
// 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 XdsRdsRequestCreateAndEncode(const std::string& route_config_name,
const XdsBootstrap::Node* node,
const char* build_version,
const std::string& version,
const std::string& nonce,
grpc_error* error) {
upb::Arena arena;
// Create a request.
envoy_api_v2_DiscoveryRequest* request =
envoy_api_v2_DiscoveryRequest_new(arena.ptr());
// Set version_info.
if (!version.empty()) {
envoy_api_v2_DiscoveryRequest_set_version_info(
request, upb_strview_makez(version.c_str()));
}
// Populate node.
if (build_version != nullptr) {
envoy_api_v2_core_Node* node_msg =
envoy_api_v2_DiscoveryRequest_mutable_node(request, arena.ptr());
PopulateNode(arena.ptr(), node, build_version, node_msg);
}
// Add resource_name.
envoy_api_v2_DiscoveryRequest_add_resource_names(
request,
upb_strview_make(route_config_name.data(), route_config_name.size()),
arena.ptr());
// Set type_url.
envoy_api_v2_DiscoveryRequest_set_type_url(request,
upb_strview_makez(kRdsTypeUrl));
// Set nonce.
if (!nonce.empty()) {
envoy_api_v2_DiscoveryRequest_set_response_nonce(
request, upb_strview_makez(nonce.c_str()));
}
// Set error_detail if it's a NACK.
if (error != GRPC_ERROR_NONE) {
grpc_slice error_description_slice;
GPR_ASSERT(grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION,
&error_description_slice));
upb_strview error_description_strview =
upb_strview_make(reinterpret_cast<const char*>(
GPR_SLICE_START_PTR(error_description_slice)),
GPR_SLICE_LENGTH(error_description_slice));
google_rpc_Status* error_detail =
envoy_api_v2_DiscoveryRequest_mutable_error_detail(request,
arena.ptr());
google_rpc_Status_set_message(error_detail, error_description_strview);
GRPC_ERROR_UNREF(error);
}
// 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 XdsCdsRequestCreateAndEncode(
const std::set<StringView>& cluster_names, const XdsBootstrap::Node* node,
const char* build_version, const std::string& version,
@ -336,6 +453,279 @@ grpc_slice XdsEdsRequestCreateAndEncode(
return grpc_slice_from_copied_buffer(output, output_length);
}
namespace {
// Better match type has smaller value.
enum MatchType {
EXACT_MATCH,
SUFFIX_MATCH,
PREFIX_MATCH,
UNIVERSE_MATCH,
INVALID_MATCH,
};
// Returns true if match succeeds.
bool DomainMatch(MatchType match_type, std::string domain_pattern,
std::string expected_host_name) {
// Normalize the args to lower-case. Domain matching is case-insensitive.
std::transform(domain_pattern.begin(), domain_pattern.end(),
domain_pattern.begin(),
[](unsigned char c) { return std::tolower(c); });
std::transform(expected_host_name.begin(), expected_host_name.end(),
expected_host_name.begin(),
[](unsigned char c) { return std::tolower(c); });
if (match_type == EXACT_MATCH) {
return domain_pattern == expected_host_name;
} else if (match_type == SUFFIX_MATCH) {
// Asterisk must match at least one char.
if (expected_host_name.size() < domain_pattern.size()) return false;
StringView pattern_suffix(domain_pattern.c_str() + 1);
StringView host_suffix(expected_host_name.c_str() +
expected_host_name.size() - pattern_suffix.size());
return pattern_suffix == host_suffix;
} else if (match_type == PREFIX_MATCH) {
// Asterisk must match at least one char.
if (expected_host_name.size() < domain_pattern.size()) return false;
StringView pattern_prefix(domain_pattern.c_str(),
domain_pattern.size() - 1);
StringView host_prefix(expected_host_name.c_str(), pattern_prefix.size());
return pattern_prefix == host_prefix;
} else {
return match_type == UNIVERSE_MATCH;
}
}
MatchType DomainPatternMatchType(const std::string& domain_pattern) {
if (domain_pattern.empty()) return INVALID_MATCH;
if (domain_pattern.find('*') == std::string::npos) return EXACT_MATCH;
if (domain_pattern == "*") return UNIVERSE_MATCH;
if (domain_pattern[0] == '*') return SUFFIX_MATCH;
if (domain_pattern[domain_pattern.size() - 1] == '*') return PREFIX_MATCH;
return INVALID_MATCH;
}
grpc_error* RouteConfigParse(
const envoy_api_v2_RouteConfiguration* route_config,
const std::string& expected_server_name, RdsUpdate* rds_update) {
// Strip off port from server name, if any.
size_t pos = expected_server_name.find(':');
std::string expected_host_name = expected_server_name.substr(0, pos);
// Get the virtual hosts.
size_t size;
const envoy_api_v2_route_VirtualHost* const* virtual_hosts =
envoy_api_v2_RouteConfiguration_virtual_hosts(route_config, &size);
// Find the best matched virtual host.
// The search order for 4 groups of domain patterns:
// 1. Exact match.
// 2. Suffix match (e.g., "*ABC").
// 3. Prefix match (e.g., "ABC*").
// 4. Universe match (i.e., "*").
// Within each group, longest match wins.
// If the same best matched domain pattern appears in multiple virtual hosts,
// the first matched virtual host wins.
const envoy_api_v2_route_VirtualHost* target_virtual_host = nullptr;
MatchType best_match_type = INVALID_MATCH;
size_t longest_match = 0;
// Check each domain pattern in each virtual host to determine the best
// matched virtual host.
for (size_t i = 0; i < size; ++i) {
size_t domain_size;
upb_strview const* domains =
envoy_api_v2_route_VirtualHost_domains(virtual_hosts[i], &domain_size);
for (size_t j = 0; j < domain_size; ++j) {
const std::string domain_pattern(domains[j].data, domains[j].size);
// Check the match type first. Skip the pattern if it's not better than
// current match.
const MatchType match_type = DomainPatternMatchType(domain_pattern);
if (match_type == INVALID_MATCH) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid domain pattern.");
}
if (match_type > best_match_type) continue;
if (match_type == best_match_type &&
domain_pattern.size() <= longest_match) {
continue;
}
// Skip if match fails.
if (!DomainMatch(match_type, domain_pattern, expected_host_name)) {
continue;
}
// Choose this match.
target_virtual_host = virtual_hosts[i];
best_match_type = match_type;
longest_match = domain_pattern.size();
if (best_match_type == EXACT_MATCH) break;
}
if (best_match_type == EXACT_MATCH) break;
}
if (target_virtual_host == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No matched virtual host found in the route config.");
}
// Get the route list from the matched virtual host.
const envoy_api_v2_route_Route* const* routes =
envoy_api_v2_route_VirtualHost_routes(target_virtual_host, &size);
if (size < 1) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No route found in the virtual host.");
}
// Only look at the last one in the route list (the default route),
const envoy_api_v2_route_Route* route = routes[size - 1];
// Validate that the match field must have a prefix field which is an empty
// string.
const envoy_api_v2_route_RouteMatch* match =
envoy_api_v2_route_Route_match(route);
if (!envoy_api_v2_route_RouteMatch_has_prefix(match)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No prefix field found in RouteMatch.");
}
const upb_strview prefix = envoy_api_v2_route_RouteMatch_prefix(match);
if (!upb_strview_eql(prefix, upb_strview_makez(""))) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Prefix is not empty string.");
}
if (!envoy_api_v2_route_Route_has_route(route)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No RouteAction found in route.");
}
const envoy_api_v2_route_RouteAction* route_action =
envoy_api_v2_route_Route_route(route);
// Get the cluster in the RouteAction.
if (!envoy_api_v2_route_RouteAction_has_cluster(route_action)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No cluster found in RouteAction.");
}
const upb_strview cluster =
envoy_api_v2_route_RouteAction_cluster(route_action);
rds_update->cluster_name = std::string(cluster.data, cluster.size);
return GRPC_ERROR_NONE;
}
} // namespace
grpc_error* LdsResponseParse(const envoy_api_v2_DiscoveryResponse* response,
const std::string& expected_server_name,
LdsUpdate* lds_update, upb_arena* arena) {
// 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(
"LDS response contains 0 resource.");
}
for (size_t i = 0; i < size; ++i) {
// Check the type_url of the resource.
const upb_strview type_url = google_protobuf_Any_type_url(resources[i]);
if (!upb_strview_eql(type_url, upb_strview_makez(kLdsTypeUrl))) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not LDS.");
}
// Decode the listener.
const upb_strview encoded_listener =
google_protobuf_Any_value(resources[i]);
const envoy_api_v2_Listener* listener = envoy_api_v2_Listener_parse(
encoded_listener.data, encoded_listener.size, arena);
if (listener == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode listener.");
}
// Check listener name. Ignore unexpected listeners.
const upb_strview name = envoy_api_v2_Listener_name(listener);
const upb_strview expected_name =
upb_strview_makez(expected_server_name.c_str());
if (!upb_strview_eql(name, expected_name)) continue;
// Get api_listener and decode it to http_connection_manager.
const envoy_config_listener_v2_ApiListener* api_listener =
envoy_api_v2_Listener_api_listener(listener);
if (api_listener == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Listener doesn't have ApiListener.");
}
const upb_strview encoded_api_listener = google_protobuf_Any_value(
envoy_config_listener_v2_ApiListener_api_listener(api_listener));
const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager*
http_connection_manager =
envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_parse(
encoded_api_listener.data, encoded_api_listener.size, arena);
// Found inlined route_config. Parse it to find the cluster_name.
if (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config(
http_connection_manager)) {
const envoy_api_v2_RouteConfiguration* route_config =
envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(
http_connection_manager);
RdsUpdate rds_update;
grpc_error* error =
RouteConfigParse(route_config, expected_server_name, &rds_update);
if (error != GRPC_ERROR_NONE) return error;
lds_update->rds_update.emplace(std::move(rds_update));
const upb_strview route_config_name =
envoy_api_v2_RouteConfiguration_name(route_config);
lds_update->route_config_name =
std::string(route_config_name.data, route_config_name.size);
return GRPC_ERROR_NONE;
}
// Validate that RDS must be used to get the route_config dynamically.
if (!envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds(
http_connection_manager)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"HttpConnectionManager neither has inlined route_config nor RDS.");
}
// Get the route_config_name.
const envoy_config_filter_network_http_connection_manager_v2_Rds* rds =
envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(
http_connection_manager);
const upb_strview route_config_name =
envoy_config_filter_network_http_connection_manager_v2_Rds_route_config_name(
rds);
lds_update->route_config_name =
std::string(route_config_name.data, route_config_name.size);
return GRPC_ERROR_NONE;
}
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No listener found for expected server name.");
}
grpc_error* RdsResponseParse(const envoy_api_v2_DiscoveryResponse* response,
const std::string& expected_server_name,
const std::string& expected_route_config_name,
RdsUpdate* rds_update, upb_arena* arena) {
// 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(
"RDS response contains 0 resource.");
}
for (size_t i = 0; i < size; ++i) {
// Check the type_url of the resource.
const upb_strview type_url = google_protobuf_Any_type_url(resources[i]);
if (!upb_strview_eql(type_url, upb_strview_makez(kRdsTypeUrl))) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not RDS.");
}
// Decode the route_config.
const upb_strview encoded_route_config =
google_protobuf_Any_value(resources[i]);
const envoy_api_v2_RouteConfiguration* route_config =
envoy_api_v2_RouteConfiguration_parse(encoded_route_config.data,
encoded_route_config.size, arena);
if (route_config == nullptr) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode route_config.");
}
// Check route_config_name. Ignore unexpected route_config.
const upb_strview name = envoy_api_v2_RouteConfiguration_name(route_config);
const upb_strview expected_name =
upb_strview_makez(expected_route_config_name.c_str());
if (!upb_strview_eql(name, expected_name)) continue;
// Parse the route_config.
RdsUpdate local_rds_update;
grpc_error* error =
RouteConfigParse(route_config, expected_server_name, &local_rds_update);
if (error != GRPC_ERROR_NONE) return error;
*rds_update = std::move(local_rds_update);
return GRPC_ERROR_NONE;
}
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No route config found for expected name.");
}
grpc_error* CdsResponseParse(const envoy_api_v2_DiscoveryResponse* response,
CdsUpdateMap* cds_update_map, upb_arena* arena) {
// Get the resources from the response.
@ -604,10 +994,12 @@ grpc_error* EdsResponsedParse(
} // namespace
grpc_error* XdsAdsResponseDecodeAndParse(
const grpc_slice& encoded_response,
const grpc_slice& encoded_response, const std::string& expected_server_name,
const std::string& expected_route_config_name,
const std::set<StringView>& expected_eds_service_names,
CdsUpdateMap* cds_update_map, EdsUpdateMap* eds_update_map,
std::string* version, std::string* nonce, std::string* type_url) {
LdsUpdate* lds_update, RdsUpdate* rds_update, CdsUpdateMap* cds_update_map,
EdsUpdateMap* eds_update_map, std::string* version, std::string* nonce,
std::string* type_url) {
upb::Arena arena;
// Decode the response.
const envoy_api_v2_DiscoveryResponse* response =
@ -630,7 +1022,14 @@ grpc_error* XdsAdsResponseDecodeAndParse(
upb_strview nonce_strview = envoy_api_v2_DiscoveryResponse_nonce(response);
*nonce = std::string(nonce_strview.data, nonce_strview.size);
// Parse the response according to the resource type.
if (*type_url == kCdsTypeUrl) {
if (*type_url == kLdsTypeUrl) {
return LdsResponseParse(response, expected_server_name, lds_update,
arena.ptr());
} else if (*type_url == kRdsTypeUrl) {
return RdsResponseParse(response, expected_server_name,
expected_route_config_name, rds_update,
arena.ptr());
} else if (*type_url == kCdsTypeUrl) {
return CdsResponseParse(response, cds_update_map, arena.ptr());
} else if (*type_url == kEdsTypeUrl) {
return EdsResponsedParse(response, expected_eds_service_names,

@ -34,6 +34,9 @@
namespace grpc_core {
constexpr char kLdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Listener";
constexpr char kRdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.RouteConfiguration";
constexpr char kCdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Cluster";
constexpr char kEdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.ClusterLoadAssignment";
@ -51,6 +54,23 @@ struct VersionState {
~VersionState() { GRPC_ERROR_UNREF(error); }
};
struct RdsUpdate {
// The name to use in the CDS request.
std::string cluster_name;
};
struct LdsUpdate {
// The name to use in the RDS request.
std::string route_config_name;
// The name to use in the CDS request. Present if the LDS response has it
// inlined.
Optional<RdsUpdate> rds_update;
};
using LdsUpdateMap = std::map<std::string /*server_name*/, LdsUpdate>;
using RdsUpdateMap = std::map<std::string /*route_config_name*/, RdsUpdate>;
struct CdsUpdate {
// The name to use in the EDS request.
// If empty, the cluster name will be used.
@ -175,6 +195,24 @@ using EdsUpdateMap = std::map<std::string /*eds_service_name*/, EdsUpdate>;
grpc_slice XdsUnsupportedTypeNackRequestCreateAndEncode(
const std::string& type_url, const std::string& nonce, grpc_error* error);
// Creates an LDS request querying \a server_name.
// Takes ownership of \a error.
grpc_slice XdsLdsRequestCreateAndEncode(const std::string& server_name,
const XdsBootstrap::Node* node,
const char* build_version,
const std::string& version,
const std::string& nonce,
grpc_error* error);
// Creates an RDS request querying \a route_config_name.
// Takes ownership of \a error.
grpc_slice XdsRdsRequestCreateAndEncode(const std::string& route_config_name,
const XdsBootstrap::Node* node,
const char* build_version,
const std::string& version,
const std::string& nonce,
grpc_error* error);
// Creates a CDS request querying \a cluster_names.
// Takes ownership of \a error.
grpc_slice XdsCdsRequestCreateAndEncode(
@ -193,10 +231,12 @@ grpc_slice XdsEdsRequestCreateAndEncode(
// EDS. If the response can't be parsed at the top level, \a type_url will point
// to an empty string; otherwise, it will point to the received data.
grpc_error* XdsAdsResponseDecodeAndParse(
const grpc_slice& encoded_response,
const grpc_slice& encoded_response, const std::string& expected_server_name,
const std::string& expected_route_config_name,
const std::set<StringView>& expected_eds_service_names,
CdsUpdateMap* cds_update_map, EdsUpdateMap* eds_update_map,
std::string* version, std::string* nonce, std::string* type_url);
LdsUpdate* lds_update, RdsUpdate* rds_update, CdsUpdateMap* cds_update_map,
EdsUpdateMap* eds_update_map, std::string* version, std::string* nonce,
std::string* type_url);
// Creates an LRS request querying \a server_name.
grpc_slice XdsLrsRequestCreateAndEncode(const std::string& server_name,

@ -146,6 +146,8 @@ class XdsClient::ChannelState::AdsCallState
~BufferedRequest() { GRPC_ERROR_UNREF(error); }
};
void AcceptLdsUpdate(LdsUpdate lds_update, std::string new_version);
void AcceptRdsUpdate(RdsUpdate rds_update, std::string new_version);
void AcceptCdsUpdate(CdsUpdateMap cds_update_map, std::string new_version);
void AcceptEdsUpdate(EdsUpdateMap eds_update_map, std::string new_version);
@ -183,6 +185,8 @@ class XdsClient::ChannelState::AdsCallState
grpc_closure on_status_received_;
// Version state.
VersionState lds_version_;
VersionState rds_version_;
VersionState cds_version_;
VersionState eds_version_;
@ -617,6 +621,15 @@ XdsClient::ChannelState::AdsCallState::AdsCallState(
GRPC_CLOSURE_INIT(&on_request_sent_, OnRequestSent, this,
grpc_schedule_on_exec_ctx);
bool initial_message = true;
if (xds_client()->service_config_watcher_ != nullptr) {
if (xds_client()->route_config_name_.empty()) {
SendMessageLocked(kLdsTypeUrl, "", nullptr, initial_message);
initial_message = false;
} else if (xds_client()->cluster_name_.empty()) {
SendMessageLocked(kRdsTypeUrl, "", nullptr, initial_message);
initial_message = false;
}
}
if (!xds_client()->cluster_map_.empty()) {
SendMessageLocked(kCdsTypeUrl, "", nullptr, initial_message);
initial_message = false;
@ -698,7 +711,19 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked(
is_first_message ? xds_client()->bootstrap_->node() : nullptr;
const char* build_version =
is_first_message ? xds_client()->build_version_.get() : nullptr;
if (type_url == kCdsTypeUrl) {
if (type_url == kLdsTypeUrl) {
request_payload_slice = XdsLdsRequestCreateAndEncode(
xds_client()->server_name_, node, build_version,
lds_version_.version_info, lds_version_.nonce, lds_version_.error);
lds_version_.error = GRPC_ERROR_NONE;
GRPC_ERROR_UNREF(error_for_unsupported_type);
} else if (type_url == kRdsTypeUrl) {
request_payload_slice = XdsRdsRequestCreateAndEncode(
xds_client()->route_config_name_, node, build_version,
rds_version_.version_info, rds_version_.nonce, rds_version_.error);
rds_version_.error = GRPC_ERROR_NONE;
GRPC_ERROR_UNREF(error_for_unsupported_type);
} else if (type_url == kCdsTypeUrl) {
request_payload_slice = XdsCdsRequestCreateAndEncode(
xds_client()->WatchedClusterNames(), node, build_version,
cds_version_.version_info, cds_version_.nonce, cds_version_.error);
@ -736,6 +761,83 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked(
}
}
void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate(
LdsUpdate lds_update, std::string new_version) {
const std::string& cluster_name =
lds_update.rds_update.has_value()
? lds_update.rds_update.value().cluster_name
: "";
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
"[xds_client %p] LDS update received: "
"route_config_name=%s, "
"cluster_name=%s (empty if RDS is needed to obtain it)",
xds_client(), lds_update.route_config_name.c_str(),
cluster_name.c_str());
}
// Ignore identical update.
if (xds_client()->route_config_name_ == lds_update.route_config_name &&
xds_client()->cluster_name_ == cluster_name) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
"[xds_client %p] LDS update identical to current, ignoring.",
xds_client());
}
return;
}
xds_client()->route_config_name_ = std::move(lds_update.route_config_name);
if (lds_update.rds_update.has_value()) {
// If cluster_name was found inlined in LDS response, notify the watcher
// immediately.
xds_client()->cluster_name_ =
std::move(lds_update.rds_update.value().cluster_name);
RefCountedPtr<ServiceConfig> service_config;
grpc_error* error = xds_client()->CreateServiceConfig(
xds_client()->cluster_name_, &service_config);
if (error == GRPC_ERROR_NONE) {
xds_client()->service_config_watcher_->OnServiceConfigChanged(
std::move(service_config));
} else {
xds_client()->service_config_watcher_->OnError(error);
}
} else {
// Send RDS request for dynamic resolution.
SendMessageLocked(kRdsTypeUrl, "", nullptr, false);
}
lds_version_.version_info = std::move(new_version);
}
void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate(
RdsUpdate rds_update, std::string new_version) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
"[xds_client %p] RDS update received: "
"cluster_name=%s",
xds_client(), rds_update.cluster_name.c_str());
}
// Ignore identical update.
if (xds_client()->cluster_name_ == rds_update.cluster_name) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
"[xds_client %p] RDS update identical to current, ignoring.",
xds_client());
}
return;
}
xds_client()->cluster_name_ = std::move(rds_update.cluster_name);
// Notify the watcher.
RefCountedPtr<ServiceConfig> service_config;
grpc_error* error = xds_client()->CreateServiceConfig(
xds_client()->cluster_name_, &service_config);
if (error == GRPC_ERROR_NONE) {
xds_client()->service_config_watcher_->OnServiceConfigChanged(
std::move(service_config));
} else {
xds_client()->service_config_watcher_->OnError(error);
}
rds_version_.version_info = std::move(new_version);
}
void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate(
CdsUpdateMap cds_update_map, std::string new_version) {
for (auto& p : cds_update_map) {
@ -931,6 +1033,8 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked(
// mode. We will also need to cancel the timer when we receive a serverlist
// from the balancer.
// Parse the response.
LdsUpdate lds_update;
RdsUpdate rds_update;
CdsUpdateMap cds_update_map;
EdsUpdateMap eds_update_map;
std::string version;
@ -938,7 +1042,8 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked(
std::string type_url;
// Note that XdsAdsResponseDecodeAndParse() also validate the response.
grpc_error* parse_error = XdsAdsResponseDecodeAndParse(
response_slice, xds_client->EdsServiceNames(), &cds_update_map,
response_slice, xds_client->server_name_, xds_client->route_config_name_,
xds_client->EdsServiceNames(), &lds_update, &rds_update, &cds_update_map,
&eds_update_map, &version, &nonce, &type_url);
grpc_slice_unref_internal(response_slice);
if (type_url.empty()) {
@ -948,7 +1053,15 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked(
GRPC_ERROR_UNREF(parse_error);
} else {
// Update nonce and error.
if (type_url == kCdsTypeUrl) {
if (type_url == kLdsTypeUrl) {
ads_calld->lds_version_.nonce = nonce;
GRPC_ERROR_UNREF(ads_calld->lds_version_.error);
ads_calld->lds_version_.error = GRPC_ERROR_REF(parse_error);
} else if (type_url == kRdsTypeUrl) {
ads_calld->rds_version_.nonce = nonce;
GRPC_ERROR_UNREF(ads_calld->rds_version_.error);
ads_calld->rds_version_.error = GRPC_ERROR_REF(parse_error);
} else if (type_url == kCdsTypeUrl) {
ads_calld->cds_version_.nonce = nonce;
GRPC_ERROR_UNREF(ads_calld->cds_version_.error);
ads_calld->cds_version_.error = GRPC_ERROR_REF(parse_error);
@ -967,8 +1080,12 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked(
ads_calld->SendMessageLocked(type_url, nonce, parse_error, false);
} else {
ads_calld->seen_response_ = true;
// Accept the (CDS or EDS) response.
if (type_url == kCdsTypeUrl) {
// Accept the ADS response according to the type_url.
if (type_url == kLdsTypeUrl) {
ads_calld->AcceptLdsUpdate(std::move(lds_update), std::move(version));
} else if (type_url == kRdsTypeUrl) {
ads_calld->AcceptRdsUpdate(std::move(rds_update), std::move(version));
} else if (type_url == kCdsTypeUrl) {
ads_calld->AcceptCdsUpdate(std::move(cds_update_map),
std::move(version));
} else if (type_url == kEdsTypeUrl) {
@ -976,7 +1093,7 @@ void XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked(
std::move(version));
}
// ACK the update.
ads_calld->SendMessageLocked(type_url, "", nullptr, false);
ads_calld->SendMessageLocked(type_url, nonce, nullptr, false);
// Start load reporting if needed.
auto& lrs_call = ads_calld->chand()->lrs_calld_;
if (lrs_call != nullptr) {
@ -1467,11 +1584,11 @@ bool XdsClient::ChannelState::LrsCallState::IsCurrentCallOnChannel() const {
namespace {
grpc_core::UniquePtr<char> GenerateBuildVersionString() {
UniquePtr<char> GenerateBuildVersionString() {
char* build_version_str;
gpr_asprintf(&build_version_str, "gRPC C-core %s %s", grpc_version_string(),
GPR_PLATFORM_STRING);
return grpc_core::UniquePtr<char>(build_version_str);
return UniquePtr<char>(build_version_str);
}
} // namespace
@ -1501,11 +1618,7 @@ XdsClient::XdsClient(Combiner* combiner, grpc_pollset_set* interested_parties,
chand_ = MakeOrphanable<ChannelState>(
Ref(DEBUG_LOCATION, "XdsClient+ChannelState"), channel_args);
if (service_config_watcher_ != nullptr) {
// TODO(juanlishen): Start LDS call and do not return service config
// until we get the first LDS response.
GRPC_CLOSURE_INIT(&service_config_notify_, NotifyOnServiceConfig,
Ref().release(), nullptr);
combiner_->Run(&service_config_notify_, GRPC_ERROR_NONE);
chand_->OnResourceNamesChanged(kLdsTypeUrl);
}
}
@ -1613,6 +1726,25 @@ void XdsClient::ResetBackoff() {
}
}
grpc_error* XdsClient::CreateServiceConfig(
const std::string& cluster_name,
RefCountedPtr<ServiceConfig>* service_config) const {
char* json;
gpr_asprintf(&json,
"{\n"
" \"loadBalancingConfig\":[\n"
" { \"cds_experimental\":{\n"
" \"cluster\": \"%s\"\n"
" } }\n"
" ]\n"
"}",
cluster_name.c_str());
grpc_error* error = GRPC_ERROR_NONE;
*service_config = ServiceConfig::Create(json, &error);
gpr_free(json);
return error;
}
std::set<StringView> XdsClient::WatchedClusterNames() const {
std::set<StringView> cluster_names;
for (const auto& p : cluster_map_) {
@ -1666,32 +1798,6 @@ void XdsClient::NotifyOnError(grpc_error* error) {
GRPC_ERROR_UNREF(error);
}
void XdsClient::NotifyOnServiceConfig(void* arg, grpc_error* error) {
XdsClient* self = static_cast<XdsClient*>(arg);
// TODO(roth): When we add support for WeightedClusters, select the
// LB policy based on that functionality.
char* json;
gpr_asprintf(&json,
"{\n"
" \"loadBalancingConfig\":[\n"
" { \"cds_experimental\":{\n"
" \"cluster\": \"%s\"\n"
" } }\n"
" ]\n"
"}",
self->server_name_.c_str());
RefCountedPtr<ServiceConfig> service_config =
ServiceConfig::Create(json, &error);
gpr_free(json);
if (error != GRPC_ERROR_NONE) {
self->service_config_watcher_->OnError(error);
} else {
self->service_config_watcher_->OnServiceConfigChanged(
std::move(service_config));
}
self->Unref();
}
void* XdsClient::ChannelArgCopy(void* p) {
XdsClient* xds_client = static_cast<XdsClient*>(p);
xds_client->Ref().release();

@ -116,8 +116,6 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
const grpc_channel_args& args);
private:
static const grpc_arg_pointer_vtable kXdsClientVtable;
// Contains a channel to the xds server and all the data related to the
// channel. Holds a ref to the xds client object.
// TODO(roth): This is separate from the XdsClient object because it was
@ -193,9 +191,9 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
// Sends an error notification to all watchers.
void NotifyOnError(grpc_error* error);
// TODO(juanlishen): Once we implement LDS support, this can be a
// normal method instead of a closure callback.
static void NotifyOnServiceConfig(void* arg, grpc_error* error);
grpc_error* CreateServiceConfig(
const std::string& cluster_name,
RefCountedPtr<ServiceConfig>* service_config) const;
std::set<StringView> WatchedClusterNames() const;
@ -208,11 +206,7 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
static void ChannelArgDestroy(void* p);
static int ChannelArgCmp(void* p, void* q);
// All the received clusters are cached, no matter they are watched or not.
std::map<StringView /*cluster_name*/, ClusterState, StringLess> cluster_map_;
// Only the watched EDS service names are stored.
std::map<StringView /*eds_service_name*/, EndpointState, StringLess>
endpoint_map_;
static const grpc_arg_pointer_vtable kXdsClientVtable;
grpc_core::UniquePtr<char> build_version_;
@ -221,15 +215,21 @@ class XdsClient : public InternallyRefCounted<XdsClient> {
std::unique_ptr<XdsBootstrap> bootstrap_;
std::string server_name_;
const std::string server_name_;
std::unique_ptr<ServiceConfigWatcherInterface> service_config_watcher_;
// TODO(juanlishen): Once we implement LDS support, this will no
// longer be needed.
grpc_closure service_config_notify_;
// The channel for communicating with the xds server.
OrphanablePtr<ChannelState> chand_;
std::string route_config_name_;
std::string cluster_name_;
// All the received clusters are cached, no matter they are watched or not.
std::map<StringView /*cluster_name*/, ClusterState, StringLess> cluster_map_;
// Only the watched EDS service names are stored.
std::map<StringView /*eds_service_name*/, EndpointState, StringLess>
endpoint_map_;
bool shutting_down_ = false;
};

@ -0,0 +1,103 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/lds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/lds.upb.h"
#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/listener/listener.upb.h"
#include "envoy/api/v2/listener/udp_listener_config.upb.h"
#include "envoy/config/listener/v2/api_listener.upb.h"
#include "google/api/annotations.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_Listener_submsgs[15] = {
&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit,
&envoy_api_v2_Listener_DeprecatedV1_msginit,
&envoy_api_v2_core_Address_msginit,
&envoy_api_v2_core_Metadata_msginit,
&envoy_api_v2_core_SocketOption_msginit,
&envoy_api_v2_listener_FilterChain_msginit,
&envoy_api_v2_listener_ListenerFilter_msginit,
&envoy_api_v2_listener_UdpListenerConfig_msginit,
&envoy_config_listener_v2_ApiListener_msginit,
&google_protobuf_BoolValue_msginit,
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_Listener__fields[19] = {
{1, UPB_SIZE(20, 24), 0, 0, 9, 1},
{2, UPB_SIZE(28, 40), 0, 2, 11, 1},
{3, UPB_SIZE(76, 136), 0, 5, 11, 3},
{4, UPB_SIZE(32, 48), 0, 9, 11, 1},
{5, UPB_SIZE(36, 56), 0, 11, 11, 1},
{6, UPB_SIZE(40, 64), 0, 3, 11, 1},
{7, UPB_SIZE(44, 72), 0, 1, 11, 1},
{8, UPB_SIZE(0, 0), 0, 0, 14, 1},
{9, UPB_SIZE(80, 144), 0, 6, 11, 3},
{10, UPB_SIZE(48, 80), 0, 9, 11, 1},
{11, UPB_SIZE(52, 88), 0, 9, 11, 1},
{12, UPB_SIZE(56, 96), 0, 11, 11, 1},
{13, UPB_SIZE(84, 152), 0, 4, 11, 3},
{15, UPB_SIZE(60, 104), 0, 10, 11, 1},
{16, UPB_SIZE(8, 8), 0, 0, 14, 1},
{17, UPB_SIZE(16, 16), 0, 0, 8, 1},
{18, UPB_SIZE(64, 112), 0, 7, 11, 1},
{19, UPB_SIZE(68, 120), 0, 8, 11, 1},
{20, UPB_SIZE(72, 128), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_Listener_msginit = {
&envoy_api_v2_Listener_submsgs[0],
&envoy_api_v2_Listener__fields[0],
UPB_SIZE(88, 160), 19, false,
};
static const upb_msglayout *const envoy_api_v2_Listener_DeprecatedV1_submsgs[1] = {
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_Listener_DeprecatedV1__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_Listener_DeprecatedV1_msginit = {
&envoy_api_v2_Listener_DeprecatedV1_submsgs[0],
&envoy_api_v2_Listener_DeprecatedV1__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[1] = {
&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit,
};
static const upb_msglayout_field envoy_api_v2_Listener_ConnectionBalanceConfig__fields[1] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit = {
&envoy_api_v2_Listener_ConnectionBalanceConfig_submsgs[0],
&envoy_api_v2_Listener_ConnectionBalanceConfig__fields[0],
UPB_SIZE(8, 16), 1, false,
};
const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,379 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/lds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_LDS_PROTO_UPB_H_
#define ENVOY_API_V2_LDS_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_Listener;
struct envoy_api_v2_Listener_DeprecatedV1;
struct envoy_api_v2_Listener_ConnectionBalanceConfig;
struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance;
typedef struct envoy_api_v2_Listener envoy_api_v2_Listener;
typedef struct envoy_api_v2_Listener_DeprecatedV1 envoy_api_v2_Listener_DeprecatedV1;
typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig envoy_api_v2_Listener_ConnectionBalanceConfig;
typedef struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance;
extern const upb_msglayout envoy_api_v2_Listener_msginit;
extern const upb_msglayout envoy_api_v2_Listener_DeprecatedV1_msginit;
extern const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit;
extern const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit;
struct envoy_api_v2_core_Address;
struct envoy_api_v2_core_Metadata;
struct envoy_api_v2_core_SocketOption;
struct envoy_api_v2_listener_FilterChain;
struct envoy_api_v2_listener_ListenerFilter;
struct envoy_api_v2_listener_UdpListenerConfig;
struct envoy_config_listener_v2_ApiListener;
struct google_protobuf_BoolValue;
struct google_protobuf_Duration;
struct google_protobuf_UInt32Value;
extern const upb_msglayout envoy_api_v2_core_Address_msginit;
extern const upb_msglayout envoy_api_v2_core_Metadata_msginit;
extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit;
extern const upb_msglayout envoy_api_v2_listener_FilterChain_msginit;
extern const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit;
extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit;
extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
typedef enum {
envoy_api_v2_Listener_DEFAULT = 0,
envoy_api_v2_Listener_MODIFY_ONLY = 1
} envoy_api_v2_Listener_DrainType;
/* envoy.api.v2.Listener */
UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_new(upb_arena *arena) {
return (envoy_api_v2_Listener *)upb_msg_new(&envoy_api_v2_Listener_msginit, arena);
}
UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_Listener *ret = envoy_api_v2_Listener_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_Listener_serialize(const envoy_api_v2_Listener *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_Listener_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_api_v2_Listener_name(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 24)); }
UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_Listener_address(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Address*, UPB_SIZE(28, 40)); }
UPB_INLINE const struct envoy_api_v2_listener_FilterChain* const* envoy_api_v2_Listener_filter_chains(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_listener_FilterChain* const*)_upb_array_accessor(msg, UPB_SIZE(76, 136), len); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_use_original_dst(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(32, 48)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_per_connection_buffer_limit_bytes(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 56)); }
UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_metadata(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(40, 64)); }
UPB_INLINE const envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_deprecated_v1(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Listener_DeprecatedV1*, UPB_SIZE(44, 72)); }
UPB_INLINE int32_t envoy_api_v2_Listener_drain_type(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
UPB_INLINE const struct envoy_api_v2_listener_ListenerFilter* const* envoy_api_v2_Listener_listener_filters(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_listener_ListenerFilter* const*)_upb_array_accessor(msg, UPB_SIZE(80, 144), len); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_transparent(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(48, 80)); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_freebind(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(52, 88)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_tcp_fast_open_queue_length(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 96)); }
UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_Listener_socket_options(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(84, 152), len); }
UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Listener_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(60, 104)); }
UPB_INLINE int32_t envoy_api_v2_Listener_traffic_direction(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); }
UPB_INLINE bool envoy_api_v2_Listener_continue_on_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); }
UPB_INLINE const struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_udp_listener_config(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_listener_UdpListenerConfig*, UPB_SIZE(64, 112)); }
UPB_INLINE const struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_api_listener(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_config_listener_v2_ApiListener*, UPB_SIZE(68, 120)); }
UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_connection_balance_config(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Listener_ConnectionBalanceConfig*, UPB_SIZE(72, 128)); }
UPB_INLINE void envoy_api_v2_Listener_set_name(envoy_api_v2_Listener *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 24)) = value;
}
UPB_INLINE void envoy_api_v2_Listener_set_address(envoy_api_v2_Listener *msg, struct envoy_api_v2_core_Address* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_Address*, UPB_SIZE(28, 40)) = value;
}
UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Listener_mutable_address(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_Listener_address(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_address(msg, sub);
}
return sub;
}
UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_mutable_filter_chains(envoy_api_v2_Listener *msg, size_t *len) {
return (struct envoy_api_v2_listener_FilterChain**)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 136), len);
}
UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_resize_filter_chains(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_listener_FilterChain**)_upb_array_resize_accessor(msg, UPB_SIZE(76, 136), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_listener_FilterChain* envoy_api_v2_Listener_add_filter_chains(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_listener_FilterChain* sub = (struct envoy_api_v2_listener_FilterChain*)upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(76, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_use_original_dst(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(32, 48)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_use_original_dst(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_use_original_dst(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_use_original_dst(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(envoy_api_v2_Listener *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 56)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_per_connection_buffer_limit_bytes(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_per_connection_buffer_limit_bytes(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_metadata(envoy_api_v2_Listener *msg, struct envoy_api_v2_core_Metadata* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(40, 64)) = value;
}
UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_mutable_metadata(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_Listener_metadata(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_metadata(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_deprecated_v1(envoy_api_v2_Listener *msg, envoy_api_v2_Listener_DeprecatedV1* value) {
UPB_FIELD_AT(msg, envoy_api_v2_Listener_DeprecatedV1*, UPB_SIZE(44, 72)) = value;
}
UPB_INLINE struct envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_mutable_deprecated_v1(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_Listener_DeprecatedV1* sub = (struct envoy_api_v2_Listener_DeprecatedV1*)envoy_api_v2_Listener_deprecated_v1(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_Listener_DeprecatedV1*)upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_deprecated_v1(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_drain_type(envoy_api_v2_Listener *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct envoy_api_v2_listener_ListenerFilter** envoy_api_v2_Listener_mutable_listener_filters(envoy_api_v2_Listener *msg, size_t *len) {
return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 144), len);
}
UPB_INLINE struct envoy_api_v2_listener_ListenerFilter** envoy_api_v2_Listener_resize_listener_filters(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 144), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_listener_ListenerFilter* envoy_api_v2_Listener_add_listener_filters(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_listener_ListenerFilter* sub = (struct envoy_api_v2_listener_ListenerFilter*)upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(80, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_transparent(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(48, 80)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_transparent(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_transparent(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_transparent(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_freebind(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(52, 88)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_freebind(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_freebind(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_freebind(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_tcp_fast_open_queue_length(envoy_api_v2_Listener *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 96)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_tcp_fast_open_queue_length(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_tcp_fast_open_queue_length(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_tcp_fast_open_queue_length(msg, sub);
}
return sub;
}
UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_mutable_socket_options(envoy_api_v2_Listener *msg, size_t *len) {
return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 152), len);
}
UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_resize_socket_options(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(84, 152), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_Listener_add_socket_options(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(84, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_listener_filters_timeout(envoy_api_v2_Listener *msg, struct google_protobuf_Duration* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(60, 104)) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Listener_mutable_listener_filters_timeout(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Listener_listener_filters_timeout(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_listener_filters_timeout(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_traffic_direction(envoy_api_v2_Listener *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE void envoy_api_v2_Listener_set_continue_on_listener_filters_timeout(envoy_api_v2_Listener *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
}
UPB_INLINE void envoy_api_v2_Listener_set_udp_listener_config(envoy_api_v2_Listener *msg, struct envoy_api_v2_listener_UdpListenerConfig* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_listener_UdpListenerConfig*, UPB_SIZE(64, 112)) = value;
}
UPB_INLINE struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_mutable_udp_listener_config(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_listener_UdpListenerConfig* sub = (struct envoy_api_v2_listener_UdpListenerConfig*)envoy_api_v2_Listener_udp_listener_config(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_listener_UdpListenerConfig*)upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_udp_listener_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_api_listener(envoy_api_v2_Listener *msg, struct envoy_config_listener_v2_ApiListener* value) {
UPB_FIELD_AT(msg, struct envoy_config_listener_v2_ApiListener*, UPB_SIZE(68, 120)) = value;
}
UPB_INLINE struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_mutable_api_listener(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_config_listener_v2_ApiListener* sub = (struct envoy_config_listener_v2_ApiListener*)envoy_api_v2_Listener_api_listener(msg);
if (sub == NULL) {
sub = (struct envoy_config_listener_v2_ApiListener*)upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_api_listener(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_Listener_set_connection_balance_config(envoy_api_v2_Listener *msg, envoy_api_v2_Listener_ConnectionBalanceConfig* value) {
UPB_FIELD_AT(msg, envoy_api_v2_Listener_ConnectionBalanceConfig*, UPB_SIZE(72, 128)) = value;
}
UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_mutable_connection_balance_config(envoy_api_v2_Listener *msg, upb_arena *arena) {
struct envoy_api_v2_Listener_ConnectionBalanceConfig* sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)envoy_api_v2_Listener_connection_balance_config(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_set_connection_balance_config(msg, sub);
}
return sub;
}
/* envoy.api.v2.Listener.DeprecatedV1 */
UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_new(upb_arena *arena) {
return (envoy_api_v2_Listener_DeprecatedV1 *)upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena);
}
UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_Listener_DeprecatedV1 *ret = envoy_api_v2_Listener_DeprecatedV1_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_DeprecatedV1_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_Listener_DeprecatedV1_serialize(const envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_Listener_DeprecatedV1_msginit, arena, len);
}
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_bind_to_port(const envoy_api_v2_Listener_DeprecatedV1 *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(envoy_api_v2_Listener_DeprecatedV1 *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_mutable_bind_to_port(envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_DeprecatedV1_bind_to_port(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(msg, sub);
}
return sub;
}
/* envoy.api.v2.Listener.ConnectionBalanceConfig */
UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_new(upb_arena *arena) {
return (envoy_api_v2_Listener_ConnectionBalanceConfig *)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena);
}
UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_Listener_ConnectionBalanceConfig *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena, len);
}
typedef enum {
envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_exact_balance = 1,
envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_NOT_SET = 0
} envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases;
UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_case(const envoy_api_v2_Listener_ConnectionBalanceConfig* msg) { return (envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
UPB_INLINE bool envoy_api_v2_Listener_ConnectionBalanceConfig_has_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* envoy_api_v2_Listener_ConnectionBalanceConfig_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
UPB_INLINE void envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* value) {
UPB_WRITE_ONEOF(msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
}
UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* envoy_api_v2_Listener_ConnectionBalanceConfig_mutable_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, upb_arena *arena) {
struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*)envoy_api_v2_Listener_ConnectionBalanceConfig_exact_balance(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(msg, sub);
}
return sub;
}
/* envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance */
UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_new(upb_arena *arena) {
return (envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena);
}
UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *ret = envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_serialize(const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena, len);
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_LDS_PROTO_UPB_H_ */

@ -0,0 +1,106 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/listener/listener.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/listener/listener.upb.h"
#include "envoy/api/v2/auth/cert.upb.h"
#include "envoy/api/v2/core/address.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_listener_Filter_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_listener_Filter__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_listener_Filter_msginit = {
&envoy_api_v2_listener_Filter_submsgs[0],
&envoy_api_v2_listener_Filter__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_listener_FilterChainMatch_submsgs[4] = {
&envoy_api_v2_core_CidrRange_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_listener_FilterChainMatch__fields[10] = {
{3, UPB_SIZE(32, 56), 0, 0, 11, 3},
{4, UPB_SIZE(8, 8), 0, 0, 9, 1},
{5, UPB_SIZE(24, 40), 0, 1, 11, 1},
{6, UPB_SIZE(36, 64), 0, 0, 11, 3},
{7, UPB_SIZE(40, 72), 0, 0, 13, 3},
{8, UPB_SIZE(28, 48), 0, 1, 11, 1},
{9, UPB_SIZE(16, 24), 0, 0, 9, 1},
{10, UPB_SIZE(44, 80), 0, 0, 9, 3},
{11, UPB_SIZE(48, 88), 0, 0, 9, 3},
{12, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout envoy_api_v2_listener_FilterChainMatch_msginit = {
&envoy_api_v2_listener_FilterChainMatch_submsgs[0],
&envoy_api_v2_listener_FilterChainMatch__fields[0],
UPB_SIZE(56, 96), 10, false,
};
static const upb_msglayout *const envoy_api_v2_listener_FilterChain_submsgs[6] = {
&envoy_api_v2_auth_DownstreamTlsContext_msginit,
&envoy_api_v2_core_Metadata_msginit,
&envoy_api_v2_core_TransportSocket_msginit,
&envoy_api_v2_listener_Filter_msginit,
&envoy_api_v2_listener_FilterChainMatch_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_listener_FilterChain__fields[7] = {
{1, UPB_SIZE(8, 16), 0, 4, 11, 1},
{2, UPB_SIZE(12, 24), 0, 0, 11, 1},
{3, UPB_SIZE(28, 56), 0, 3, 11, 3},
{4, UPB_SIZE(16, 32), 0, 5, 11, 1},
{5, UPB_SIZE(20, 40), 0, 1, 11, 1},
{6, UPB_SIZE(24, 48), 0, 2, 11, 1},
{7, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_listener_FilterChain_msginit = {
&envoy_api_v2_listener_FilterChain_submsgs[0],
&envoy_api_v2_listener_FilterChain__fields[0],
UPB_SIZE(32, 64), 7, false,
};
static const upb_msglayout *const envoy_api_v2_listener_ListenerFilter_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_listener_ListenerFilter__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit = {
&envoy_api_v2_listener_ListenerFilter_submsgs[0],
&envoy_api_v2_listener_ListenerFilter__fields[0],
UPB_SIZE(16, 32), 3, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,389 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/listener/listener.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_
#define ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_listener_Filter;
struct envoy_api_v2_listener_FilterChainMatch;
struct envoy_api_v2_listener_FilterChain;
struct envoy_api_v2_listener_ListenerFilter;
typedef struct envoy_api_v2_listener_Filter envoy_api_v2_listener_Filter;
typedef struct envoy_api_v2_listener_FilterChainMatch envoy_api_v2_listener_FilterChainMatch;
typedef struct envoy_api_v2_listener_FilterChain envoy_api_v2_listener_FilterChain;
typedef struct envoy_api_v2_listener_ListenerFilter envoy_api_v2_listener_ListenerFilter;
extern const upb_msglayout envoy_api_v2_listener_Filter_msginit;
extern const upb_msglayout envoy_api_v2_listener_FilterChainMatch_msginit;
extern const upb_msglayout envoy_api_v2_listener_FilterChain_msginit;
extern const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit;
struct envoy_api_v2_auth_DownstreamTlsContext;
struct envoy_api_v2_core_CidrRange;
struct envoy_api_v2_core_Metadata;
struct envoy_api_v2_core_TransportSocket;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
struct google_protobuf_Struct;
struct google_protobuf_UInt32Value;
extern const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit;
extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit;
extern const upb_msglayout envoy_api_v2_core_Metadata_msginit;
extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
typedef enum {
envoy_api_v2_listener_FilterChainMatch_ANY = 0,
envoy_api_v2_listener_FilterChainMatch_LOCAL = 1,
envoy_api_v2_listener_FilterChainMatch_EXTERNAL = 2
} envoy_api_v2_listener_FilterChainMatch_ConnectionSourceType;
/* envoy.api.v2.listener.Filter */
UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_new(upb_arena *arena) {
return (envoy_api_v2_listener_Filter *)upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena);
}
UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_listener_Filter *ret = envoy_api_v2_listener_Filter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_Filter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_listener_Filter_serialize(const envoy_api_v2_listener_Filter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_listener_Filter_msginit, arena, len);
}
typedef enum {
envoy_api_v2_listener_Filter_config_type_config = 2,
envoy_api_v2_listener_Filter_config_type_typed_config = 4,
envoy_api_v2_listener_Filter_config_type_NOT_SET = 0
} envoy_api_v2_listener_Filter_config_type_oneofcases;
UPB_INLINE envoy_api_v2_listener_Filter_config_type_oneofcases envoy_api_v2_listener_Filter_config_type_case(const envoy_api_v2_listener_Filter* msg) { return (envoy_api_v2_listener_Filter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview envoy_api_v2_listener_Filter_name(const envoy_api_v2_listener_Filter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_listener_Filter_has_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_Filter_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool envoy_api_v2_listener_Filter_has_typed_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); }
UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_Filter_typed_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
UPB_INLINE void envoy_api_v2_listener_Filter_set_name(envoy_api_v2_listener_Filter *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_listener_Filter_set_config(envoy_api_v2_listener_Filter *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_Filter_mutable_config(envoy_api_v2_listener_Filter *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_Filter_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_Filter_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_Filter_set_typed_config(envoy_api_v2_listener_Filter *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
}
UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_Filter_mutable_typed_config(envoy_api_v2_listener_Filter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_Filter_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_Filter_set_typed_config(msg, sub);
}
return sub;
}
/* envoy.api.v2.listener.FilterChainMatch */
UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_new(upb_arena *arena) {
return (envoy_api_v2_listener_FilterChainMatch *)upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena);
}
UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_listener_FilterChainMatch *ret = envoy_api_v2_listener_FilterChainMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChainMatch_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_listener_FilterChainMatch_serialize(const envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_listener_FilterChainMatch_msginit, arena, len);
}
UPB_INLINE const struct envoy_api_v2_core_CidrRange* const* envoy_api_v2_listener_FilterChainMatch_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (const struct envoy_api_v2_core_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_address_suffix(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_suffix_len(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)); }
UPB_INLINE const struct envoy_api_v2_core_CidrRange* const* envoy_api_v2_listener_FilterChainMatch_source_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (const struct envoy_api_v2_core_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
UPB_INLINE uint32_t const* envoy_api_v2_listener_FilterChainMatch_source_ports(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_destination_port(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)); }
UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_transport_protocol(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); }
UPB_INLINE upb_strview const* envoy_api_v2_listener_FilterChainMatch_application_protocols(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
UPB_INLINE upb_strview const* envoy_api_v2_listener_FilterChainMatch_server_names(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); }
UPB_INLINE int32_t envoy_api_v2_listener_FilterChainMatch_source_type(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_mutable_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) {
return (struct envoy_api_v2_core_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
}
UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_resize_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_api_v2_listener_FilterChainMatch_add_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) {
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_address_suffix(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_suffix_len(envoy_api_v2_listener_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_suffix_len(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_suffix_len(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChainMatch_set_suffix_len(msg, sub);
}
return sub;
}
UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_mutable_source_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) {
return (struct envoy_api_v2_core_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
}
UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_resize_source_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_api_v2_listener_FilterChainMatch_add_source_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) {
struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_mutable_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) {
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
}
UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_resize_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) {
return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena);
}
UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, uint32_t val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(40, 72), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena);
}
UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_destination_port(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChainMatch_set_destination_port(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_transport_protocol(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value;
}
UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_mutable_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
}
UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_resize_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(44, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_mutable_server_names(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len);
}
UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_resize_server_names(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_server_names(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_source_type(envoy_api_v2_listener_FilterChainMatch *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
/* envoy.api.v2.listener.FilterChain */
UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_new(upb_arena *arena) {
return (envoy_api_v2_listener_FilterChain *)upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena);
}
UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_listener_FilterChain *ret = envoy_api_v2_listener_FilterChain_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_FilterChain_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_listener_FilterChain_serialize(const envoy_api_v2_listener_FilterChain *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_listener_FilterChain_msginit, arena, len);
}
UPB_INLINE const envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_filter_chain_match(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_listener_FilterChainMatch*, UPB_SIZE(8, 16)); }
UPB_INLINE const struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_tls_context(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_DownstreamTlsContext*, UPB_SIZE(12, 24)); }
UPB_INLINE const envoy_api_v2_listener_Filter* const* envoy_api_v2_listener_FilterChain_filters(const envoy_api_v2_listener_FilterChain *msg, size_t *len) { return (const envoy_api_v2_listener_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_use_proxy_proto(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)); }
UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_metadata(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(20, 40)); }
UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_transport_socket(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(24, 48)); }
UPB_INLINE upb_strview envoy_api_v2_listener_FilterChain_name(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_filter_chain_match(envoy_api_v2_listener_FilterChain *msg, envoy_api_v2_listener_FilterChainMatch* value) {
UPB_FIELD_AT(msg, envoy_api_v2_listener_FilterChainMatch*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_mutable_filter_chain_match(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct envoy_api_v2_listener_FilterChainMatch* sub = (struct envoy_api_v2_listener_FilterChainMatch*)envoy_api_v2_listener_FilterChain_filter_chain_match(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_listener_FilterChainMatch*)upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChain_set_filter_chain_match(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_tls_context(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_auth_DownstreamTlsContext* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_auth_DownstreamTlsContext*, UPB_SIZE(12, 24)) = value;
}
UPB_INLINE struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_mutable_tls_context(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct envoy_api_v2_auth_DownstreamTlsContext* sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)envoy_api_v2_listener_FilterChain_tls_context(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)upb_msg_new(&envoy_api_v2_auth_DownstreamTlsContext_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChain_set_tls_context(msg, sub);
}
return sub;
}
UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_mutable_filters(envoy_api_v2_listener_FilterChain *msg, size_t *len) {
return (envoy_api_v2_listener_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_resize_filters(envoy_api_v2_listener_FilterChain *msg, size_t len, upb_arena *arena) {
return (envoy_api_v2_listener_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_listener_Filter* envoy_api_v2_listener_FilterChain_add_filters(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct envoy_api_v2_listener_Filter* sub = (struct envoy_api_v2_listener_Filter*)upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_use_proxy_proto(envoy_api_v2_listener_FilterChain *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_mutable_use_proxy_proto(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_listener_FilterChain_use_proxy_proto(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChain_set_use_proxy_proto(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_metadata(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_core_Metadata* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(20, 40)) = value;
}
UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_mutable_metadata(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_listener_FilterChain_metadata(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChain_set_metadata(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_transport_socket(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_core_TransportSocket* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(24, 48)) = value;
}
UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_mutable_transport_socket(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) {
struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_listener_FilterChain_transport_socket(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_TransportSocket*)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_FilterChain_set_transport_socket(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_FilterChain_set_name(envoy_api_v2_listener_FilterChain *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
/* envoy.api.v2.listener.ListenerFilter */
UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_new(upb_arena *arena) {
return (envoy_api_v2_listener_ListenerFilter *)upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena);
}
UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_listener_ListenerFilter *ret = envoy_api_v2_listener_ListenerFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_ListenerFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_listener_ListenerFilter_serialize(const envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_listener_ListenerFilter_msginit, arena, len);
}
typedef enum {
envoy_api_v2_listener_ListenerFilter_config_type_config = 2,
envoy_api_v2_listener_ListenerFilter_config_type_typed_config = 3,
envoy_api_v2_listener_ListenerFilter_config_type_NOT_SET = 0
} envoy_api_v2_listener_ListenerFilter_config_type_oneofcases;
UPB_INLINE envoy_api_v2_listener_ListenerFilter_config_type_oneofcases envoy_api_v2_listener_ListenerFilter_config_type_case(const envoy_api_v2_listener_ListenerFilter* msg) { return (envoy_api_v2_listener_ListenerFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview envoy_api_v2_listener_ListenerFilter_name(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_ListenerFilter_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); }
UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_name(envoy_api_v2_listener_ListenerFilter *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_config(envoy_api_v2_listener_ListenerFilter *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_ListenerFilter_mutable_config(envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_ListenerFilter_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_ListenerFilter_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_typed_config(envoy_api_v2_listener_ListenerFilter *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_mutable_typed_config(envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_ListenerFilter_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_ListenerFilter_set_typed_config(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_ */

@ -0,0 +1,35 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/listener/udp_listener_config.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/listener/udp_listener_config.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_listener_UdpListenerConfig_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_listener_UdpListenerConfig__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit = {
&envoy_api_v2_listener_UdpListenerConfig_submsgs[0],
&envoy_api_v2_listener_UdpListenerConfig__fields[0],
UPB_SIZE(16, 32), 3, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,93 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/listener/udp_listener_config.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_
#define ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_listener_UdpListenerConfig;
typedef struct envoy_api_v2_listener_UdpListenerConfig envoy_api_v2_listener_UdpListenerConfig;
extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit;
struct google_protobuf_Any;
struct google_protobuf_Struct;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
/* envoy.api.v2.listener.UdpListenerConfig */
UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_new(upb_arena *arena) {
return (envoy_api_v2_listener_UdpListenerConfig *)upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena);
}
UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_listener_UdpListenerConfig *ret = envoy_api_v2_listener_UdpListenerConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_listener_UdpListenerConfig_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_listener_UdpListenerConfig_serialize(const envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_listener_UdpListenerConfig_msginit, arena, len);
}
typedef enum {
envoy_api_v2_listener_UdpListenerConfig_config_type_config = 2,
envoy_api_v2_listener_UdpListenerConfig_config_type_typed_config = 3,
envoy_api_v2_listener_UdpListenerConfig_config_type_NOT_SET = 0
} envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases;
UPB_INLINE envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases envoy_api_v2_listener_UdpListenerConfig_config_type_case(const envoy_api_v2_listener_UdpListenerConfig* msg) { return (envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview envoy_api_v2_listener_UdpListenerConfig_udp_listener_name(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); }
UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_udp_listener_name(envoy_api_v2_listener_UdpListenerConfig *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_config(envoy_api_v2_listener_UdpListenerConfig *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_mutable_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_UdpListenerConfig_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_UdpListenerConfig_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_typed_config(envoy_api_v2_listener_UdpListenerConfig *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_mutable_typed_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_UdpListenerConfig_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_listener_UdpListenerConfig_set_typed_config(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ */

@ -0,0 +1,63 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/rds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/rds.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/api/v2/core/config_source.upb.h"
#include "envoy/api/v2/discovery.upb.h"
#include "envoy/api/v2/route/route.upb.h"
#include "google/api/annotations.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_RouteConfiguration_submsgs[5] = {
&envoy_api_v2_Vhds_msginit,
&envoy_api_v2_core_HeaderValueOption_msginit,
&envoy_api_v2_route_VirtualHost_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_RouteConfiguration__fields[10] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(20, 40), 0, 2, 11, 3},
{3, UPB_SIZE(24, 48), 0, 0, 9, 3},
{4, UPB_SIZE(28, 56), 0, 1, 11, 3},
{5, UPB_SIZE(32, 64), 0, 0, 9, 3},
{6, UPB_SIZE(36, 72), 0, 1, 11, 3},
{7, UPB_SIZE(12, 24), 0, 3, 11, 1},
{8, UPB_SIZE(40, 80), 0, 0, 9, 3},
{9, UPB_SIZE(16, 32), 0, 0, 11, 1},
{10, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_RouteConfiguration_msginit = {
&envoy_api_v2_RouteConfiguration_submsgs[0],
&envoy_api_v2_RouteConfiguration__fields[0],
UPB_SIZE(48, 96), 10, false,
};
static const upb_msglayout *const envoy_api_v2_Vhds_submsgs[1] = {
&envoy_api_v2_core_ConfigSource_msginit,
};
static const upb_msglayout_field envoy_api_v2_Vhds__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_Vhds_msginit = {
&envoy_api_v2_Vhds_submsgs[0],
&envoy_api_v2_Vhds__fields[0],
UPB_SIZE(4, 8), 1, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,199 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/rds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_RDS_PROTO_UPB_H_
#define ENVOY_API_V2_RDS_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_RouteConfiguration;
struct envoy_api_v2_Vhds;
typedef struct envoy_api_v2_RouteConfiguration envoy_api_v2_RouteConfiguration;
typedef struct envoy_api_v2_Vhds envoy_api_v2_Vhds;
extern const upb_msglayout envoy_api_v2_RouteConfiguration_msginit;
extern const upb_msglayout envoy_api_v2_Vhds_msginit;
struct envoy_api_v2_core_ConfigSource;
struct envoy_api_v2_core_HeaderValueOption;
struct envoy_api_v2_route_VirtualHost;
struct google_protobuf_BoolValue;
extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit;
extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit;
extern const upb_msglayout envoy_api_v2_route_VirtualHost_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
/* envoy.api.v2.RouteConfiguration */
UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_new(upb_arena *arena) {
return (envoy_api_v2_RouteConfiguration *)upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena);
}
UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_RouteConfiguration *ret = envoy_api_v2_RouteConfiguration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_RouteConfiguration_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_RouteConfiguration_serialize(const envoy_api_v2_RouteConfiguration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_RouteConfiguration_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_api_v2_RouteConfiguration_name(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
UPB_INLINE const struct envoy_api_v2_route_VirtualHost* const* envoy_api_v2_RouteConfiguration_virtual_hosts(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_route_VirtualHost* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_internal_only_headers(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_RouteConfiguration_response_headers_to_add(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_response_headers_to_remove(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_RouteConfiguration_request_headers_to_add(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_validate_clusters(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_request_headers_to_remove(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
UPB_INLINE const envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_vhds(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Vhds*, UPB_SIZE(16, 32)); }
UPB_INLINE bool envoy_api_v2_RouteConfiguration_most_specific_header_mutations_wins(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_api_v2_RouteConfiguration_set_name(envoy_api_v2_RouteConfiguration *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
}
UPB_INLINE struct envoy_api_v2_route_VirtualHost** envoy_api_v2_RouteConfiguration_mutable_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (struct envoy_api_v2_route_VirtualHost**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_api_v2_route_VirtualHost** envoy_api_v2_RouteConfiguration_resize_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_route_VirtualHost**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_route_VirtualHost* envoy_api_v2_RouteConfiguration_add_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_api_v2_route_VirtualHost* sub = (struct envoy_api_v2_route_VirtualHost*)upb_msg_new(&envoy_api_v2_route_VirtualHost_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_mutable_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_resize_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_RouteConfiguration_add_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_mutable_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_resize_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_RouteConfiguration_add_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_api_v2_RouteConfiguration_set_validate_clusters(envoy_api_v2_RouteConfiguration *msg, struct google_protobuf_BoolValue* value) {
UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_mutable_validate_clusters(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_RouteConfiguration_validate_clusters(msg);
if (sub == NULL) {
sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_RouteConfiguration_set_validate_clusters(msg, sub);
}
return sub;
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
UPB_INLINE void envoy_api_v2_RouteConfiguration_set_vhds(envoy_api_v2_RouteConfiguration *msg, envoy_api_v2_Vhds* value) {
UPB_FIELD_AT(msg, envoy_api_v2_Vhds*, UPB_SIZE(16, 32)) = value;
}
UPB_INLINE struct envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_mutable_vhds(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_api_v2_Vhds* sub = (struct envoy_api_v2_Vhds*)envoy_api_v2_RouteConfiguration_vhds(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_Vhds*)upb_msg_new(&envoy_api_v2_Vhds_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_RouteConfiguration_set_vhds(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_api_v2_RouteConfiguration_set_most_specific_header_mutations_wins(envoy_api_v2_RouteConfiguration *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
/* envoy.api.v2.Vhds */
UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_new(upb_arena *arena) {
return (envoy_api_v2_Vhds *)upb_msg_new(&envoy_api_v2_Vhds_msginit, arena);
}
UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_Vhds *ret = envoy_api_v2_Vhds_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Vhds_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_Vhds_serialize(const envoy_api_v2_Vhds *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_Vhds_msginit, arena, len);
}
UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_config_source(const envoy_api_v2_Vhds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_api_v2_Vhds_set_config_source(envoy_api_v2_Vhds *msg, struct envoy_api_v2_core_ConfigSource* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_mutable_config_source(envoy_api_v2_Vhds *msg, upb_arena *arena) {
struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Vhds_config_source(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_Vhds_set_config_source(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_RDS_PROTO_UPB_H_ */

@ -0,0 +1,731 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/route/route.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/route/route.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/type/matcher/regex.upb.h"
#include "envoy/type/matcher/string.upb.h"
#include "envoy/type/percent.upb.h"
#include "envoy/type/range.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_route_VirtualHost_submsgs[10] = {
&envoy_api_v2_core_HeaderValueOption_msginit,
&envoy_api_v2_route_CorsPolicy_msginit,
&envoy_api_v2_route_HedgePolicy_msginit,
&envoy_api_v2_route_RateLimit_msginit,
&envoy_api_v2_route_RetryPolicy_msginit,
&envoy_api_v2_route_Route_msginit,
&envoy_api_v2_route_VirtualCluster_msginit,
&envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit,
&envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_VirtualHost__fields[16] = {
{1, UPB_SIZE(12, 16), 0, 0, 9, 1},
{2, UPB_SIZE(32, 56), 0, 0, 9, 3},
{3, UPB_SIZE(36, 64), 0, 5, 11, 3},
{4, UPB_SIZE(0, 0), 0, 0, 14, 1},
{5, UPB_SIZE(40, 72), 0, 6, 11, 3},
{6, UPB_SIZE(44, 80), 0, 3, 11, 3},
{7, UPB_SIZE(48, 88), 0, 0, 11, 3},
{8, UPB_SIZE(20, 32), 0, 1, 11, 1},
{10, UPB_SIZE(52, 96), 0, 0, 11, 3},
{11, UPB_SIZE(56, 104), 0, 0, 9, 3},
{12, UPB_SIZE(60, 112), 0, 7, 11, 3},
{13, UPB_SIZE(64, 120), 0, 0, 9, 3},
{14, UPB_SIZE(8, 8), 0, 0, 8, 1},
{15, UPB_SIZE(68, 128), 0, 8, 11, 3},
{16, UPB_SIZE(24, 40), 0, 4, 11, 1},
{17, UPB_SIZE(28, 48), 0, 2, 11, 1},
};
const upb_msglayout envoy_api_v2_route_VirtualHost_msginit = {
&envoy_api_v2_route_VirtualHost_submsgs[0],
&envoy_api_v2_route_VirtualHost__fields[0],
UPB_SIZE(72, 144), 16, false,
};
static const upb_msglayout *const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit = {
&envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_VirtualHost_PerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Any_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit = {
&envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_Route_submsgs[11] = {
&envoy_api_v2_core_HeaderValueOption_msginit,
&envoy_api_v2_core_Metadata_msginit,
&envoy_api_v2_route_Decorator_msginit,
&envoy_api_v2_route_DirectResponseAction_msginit,
&envoy_api_v2_route_RedirectAction_msginit,
&envoy_api_v2_route_Route_PerFilterConfigEntry_msginit,
&envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit,
&envoy_api_v2_route_RouteAction_msginit,
&envoy_api_v2_route_RouteMatch_msginit,
&envoy_api_v2_route_Tracing_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_Route__fields[14] = {
{1, UPB_SIZE(8, 16), 0, 8, 11, 1},
{2, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 7, 11, 1},
{3, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 4, 11, 1},
{4, UPB_SIZE(12, 24), 0, 1, 11, 1},
{5, UPB_SIZE(16, 32), 0, 2, 11, 1},
{7, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 3, 11, 1},
{8, UPB_SIZE(24, 48), 0, 5, 11, 3},
{9, UPB_SIZE(28, 56), 0, 0, 11, 3},
{10, UPB_SIZE(32, 64), 0, 0, 11, 3},
{11, UPB_SIZE(36, 72), 0, 0, 9, 3},
{12, UPB_SIZE(40, 80), 0, 0, 9, 3},
{13, UPB_SIZE(44, 88), 0, 6, 11, 3},
{14, UPB_SIZE(0, 0), 0, 0, 9, 1},
{15, UPB_SIZE(20, 40), 0, 9, 11, 1},
};
const upb_msglayout envoy_api_v2_route_Route_msginit = {
&envoy_api_v2_route_Route_submsgs[0],
&envoy_api_v2_route_Route__fields[0],
UPB_SIZE(56, 112), 14, false,
};
static const upb_msglayout *const envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_Route_PerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_Route_PerFilterConfigEntry_msginit = {
&envoy_api_v2_route_Route_PerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_Route_PerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Any_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit = {
&envoy_api_v2_route_Route_TypedPerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_Route_TypedPerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_submsgs[2] = {
&envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_WeightedCluster__fields[3] = {
{1, UPB_SIZE(12, 24), 0, 0, 11, 3},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
{3, UPB_SIZE(8, 16), 0, 1, 11, 1},
};
const upb_msglayout envoy_api_v2_route_WeightedCluster_msginit = {
&envoy_api_v2_route_WeightedCluster_submsgs[0],
&envoy_api_v2_route_WeightedCluster__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[6] = {
&envoy_api_v2_core_HeaderValueOption_msginit,
&envoy_api_v2_core_Metadata_msginit,
&envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit,
&envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[9] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 4, 11, 1},
{3, UPB_SIZE(12, 24), 0, 1, 11, 1},
{4, UPB_SIZE(16, 32), 0, 0, 11, 3},
{5, UPB_SIZE(20, 40), 0, 0, 11, 3},
{6, UPB_SIZE(24, 48), 0, 0, 9, 3},
{8, UPB_SIZE(28, 56), 0, 2, 11, 3},
{9, UPB_SIZE(32, 64), 0, 0, 9, 3},
{10, UPB_SIZE(36, 72), 0, 3, 11, 3},
};
const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit = {
&envoy_api_v2_route_WeightedCluster_ClusterWeight_submsgs[0],
&envoy_api_v2_route_WeightedCluster_ClusterWeight__fields[0],
UPB_SIZE(40, 80), 9, false,
};
static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit = {
&envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[1] = {
&google_protobuf_Any_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit = {
&envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[0],
&envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteMatch_submsgs[6] = {
&envoy_api_v2_core_RuntimeFractionalPercent_msginit,
&envoy_api_v2_route_HeaderMatcher_msginit,
&envoy_api_v2_route_QueryParameterMatcher_msginit,
&envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit,
&envoy_type_matcher_RegexMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteMatch__fields[9] = {
{1, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1},
{2, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1},
{3, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 0, 9, 1},
{4, UPB_SIZE(0, 0), 0, 5, 11, 1},
{6, UPB_SIZE(12, 24), 0, 1, 11, 3},
{7, UPB_SIZE(16, 32), 0, 2, 11, 3},
{8, UPB_SIZE(4, 8), 0, 3, 11, 1},
{9, UPB_SIZE(8, 16), 0, 0, 11, 1},
{10, UPB_SIZE(20, 40), UPB_SIZE(-29, -57), 4, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RouteMatch_msginit = {
&envoy_api_v2_route_RouteMatch_submsgs[0],
&envoy_api_v2_route_RouteMatch__fields[0],
UPB_SIZE(32, 64), 9, false,
};
const upb_msglayout envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
static const upb_msglayout *const envoy_api_v2_route_CorsPolicy_submsgs[5] = {
&envoy_api_v2_core_RuntimeFractionalPercent_msginit,
&envoy_type_matcher_StringMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_CorsPolicy__fields[11] = {
{1, UPB_SIZE(40, 80), 0, 0, 9, 3},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
{3, UPB_SIZE(8, 16), 0, 0, 9, 1},
{4, UPB_SIZE(16, 32), 0, 0, 9, 1},
{5, UPB_SIZE(24, 48), 0, 0, 9, 1},
{6, UPB_SIZE(32, 64), 0, 2, 11, 1},
{7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 2, 11, 1},
{8, UPB_SIZE(44, 88), 0, 0, 9, 3},
{9, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 0, 11, 1},
{10, UPB_SIZE(36, 72), 0, 0, 11, 1},
{11, UPB_SIZE(48, 96), 0, 1, 11, 3},
};
const upb_msglayout envoy_api_v2_route_CorsPolicy_msginit = {
&envoy_api_v2_route_CorsPolicy_submsgs[0],
&envoy_api_v2_route_CorsPolicy__fields[0],
UPB_SIZE(64, 128), 11, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteAction_submsgs[15] = {
&envoy_api_v2_core_Metadata_msginit,
&envoy_api_v2_route_CorsPolicy_msginit,
&envoy_api_v2_route_HedgePolicy_msginit,
&envoy_api_v2_route_RateLimit_msginit,
&envoy_api_v2_route_RetryPolicy_msginit,
&envoy_api_v2_route_RouteAction_HashPolicy_msginit,
&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit,
&envoy_api_v2_route_RouteAction_UpgradeConfig_msginit,
&envoy_api_v2_route_WeightedCluster_msginit,
&google_protobuf_BoolValue_msginit,
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[23] = {
{1, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 0, 9, 1},
{2, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 0, 9, 1},
{3, UPB_SIZE(84, 144), UPB_SIZE(-93, -161), 8, 11, 1},
{4, UPB_SIZE(32, 40), 0, 0, 11, 1},
{5, UPB_SIZE(24, 24), 0, 0, 9, 1},
{6, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 0, 9, 1},
{7, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 9, 11, 1},
{8, UPB_SIZE(36, 48), 0, 10, 11, 1},
{9, UPB_SIZE(40, 56), 0, 4, 11, 1},
{10, UPB_SIZE(44, 64), 0, 6, 11, 1},
{11, UPB_SIZE(0, 0), 0, 0, 14, 1},
{13, UPB_SIZE(72, 120), 0, 3, 11, 3},
{14, UPB_SIZE(48, 72), 0, 9, 11, 1},
{15, UPB_SIZE(76, 128), 0, 5, 11, 3},
{17, UPB_SIZE(52, 80), 0, 1, 11, 1},
{20, UPB_SIZE(8, 8), 0, 0, 14, 1},
{23, UPB_SIZE(56, 88), 0, 10, 11, 1},
{24, UPB_SIZE(60, 96), 0, 10, 11, 1},
{25, UPB_SIZE(80, 136), 0, 7, 11, 3},
{26, UPB_SIZE(16, 16), 0, 0, 14, 1},
{27, UPB_SIZE(64, 104), 0, 2, 11, 1},
{28, UPB_SIZE(68, 112), 0, 10, 11, 1},
{29, UPB_SIZE(96, 168), UPB_SIZE(-105, -185), 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_msginit = {
&envoy_api_v2_route_RouteAction_submsgs[0],
&envoy_api_v2_route_RouteAction__fields[0],
UPB_SIZE(112, 192), 23, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[1] = {
&envoy_api_v2_core_RuntimeFractionalPercent_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
{3, UPB_SIZE(16, 32), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit = {
&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_submsgs[0],
&envoy_api_v2_route_RouteAction_RequestMirrorPolicy__fields[0],
UPB_SIZE(24, 48), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_submsgs[3] = {
&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit,
&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit,
&envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy__fields[4] = {
{1, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 2, 11, 1},
{2, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 1, 11, 1},
{3, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 0, 11, 1},
{4, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit = {
&envoy_api_v2_route_RouteAction_HashPolicy_submsgs[0],
&envoy_api_v2_route_RouteAction_HashPolicy__fields[0],
UPB_SIZE(12, 24), 4, false,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit = {
NULL,
&envoy_api_v2_route_RouteAction_HashPolicy_Header__fields[0],
UPB_SIZE(8, 16), 1, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(16, 32), 0, 0, 11, 1},
{3, UPB_SIZE(8, 16), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit = {
&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_submsgs[0],
&envoy_api_v2_route_RouteAction_HashPolicy_Cookie__fields[0],
UPB_SIZE(24, 48), 3, false,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit = {
NULL,
&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties__fields[0],
UPB_SIZE(1, 1), 1, false,
};
static const upb_msglayout *const envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[1] = {
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RouteAction_UpgradeConfig__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RouteAction_UpgradeConfig_msginit = {
&envoy_api_v2_route_RouteAction_UpgradeConfig_submsgs[0],
&envoy_api_v2_route_RouteAction_UpgradeConfig__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_submsgs[7] = {
&envoy_api_v2_route_HeaderMatcher_msginit,
&envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit,
&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit,
&envoy_api_v2_route_RetryPolicy_RetryPriority_msginit,
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RetryPolicy__fields[10] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(16, 24), 0, 5, 11, 1},
{3, UPB_SIZE(20, 32), 0, 4, 11, 1},
{4, UPB_SIZE(24, 40), 0, 3, 11, 1},
{5, UPB_SIZE(32, 56), 0, 2, 11, 3},
{6, UPB_SIZE(0, 0), 0, 0, 3, 1},
{7, UPB_SIZE(36, 64), 0, 0, 13, 3},
{8, UPB_SIZE(28, 48), 0, 1, 11, 1},
{9, UPB_SIZE(40, 72), 0, 0, 11, 3},
{10, UPB_SIZE(44, 80), 0, 0, 11, 3},
};
const upb_msglayout envoy_api_v2_route_RetryPolicy_msginit = {
&envoy_api_v2_route_RetryPolicy_submsgs[0],
&envoy_api_v2_route_RetryPolicy__fields[0],
UPB_SIZE(48, 96), 10, false,
};
static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryPriority__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit = {
&envoy_api_v2_route_RetryPolicy_RetryPriority_submsgs[0],
&envoy_api_v2_route_RetryPolicy_RetryPriority__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit = {
&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_submsgs[0],
&envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[2] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit = {
&envoy_api_v2_route_RetryPolicy_RetryBackOff_submsgs[0],
&envoy_api_v2_route_RetryPolicy_RetryBackOff__fields[0],
UPB_SIZE(8, 16), 2, false,
};
static const upb_msglayout *const envoy_api_v2_route_HedgePolicy_submsgs[2] = {
&envoy_type_FractionalPercent_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_HedgePolicy__fields[3] = {
{1, UPB_SIZE(4, 8), 0, 1, 11, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
{3, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit = {
&envoy_api_v2_route_HedgePolicy_submsgs[0],
&envoy_api_v2_route_HedgePolicy__fields[0],
UPB_SIZE(12, 24), 3, false,
};
static const upb_msglayout_field envoy_api_v2_route_RedirectAction__fields[8] = {
{1, UPB_SIZE(16, 16), 0, 0, 9, 1},
{2, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1},
{3, UPB_SIZE(0, 0), 0, 0, 14, 1},
{4, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 8, 1},
{5, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1},
{6, UPB_SIZE(12, 12), 0, 0, 8, 1},
{7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1},
{8, UPB_SIZE(8, 8), 0, 0, 13, 1},
};
const upb_msglayout envoy_api_v2_route_RedirectAction_msginit = {
NULL,
&envoy_api_v2_route_RedirectAction__fields[0],
UPB_SIZE(48, 80), 8, false,
};
static const upb_msglayout *const envoy_api_v2_route_DirectResponseAction_submsgs[1] = {
&envoy_api_v2_core_DataSource_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_DirectResponseAction__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 13, 1},
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_DirectResponseAction_msginit = {
&envoy_api_v2_route_DirectResponseAction_submsgs[0],
&envoy_api_v2_route_DirectResponseAction__fields[0],
UPB_SIZE(8, 16), 2, false,
};
static const upb_msglayout_field envoy_api_v2_route_Decorator__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_Decorator_msginit = {
NULL,
&envoy_api_v2_route_Decorator__fields[0],
UPB_SIZE(8, 16), 1, false,
};
static const upb_msglayout *const envoy_api_v2_route_Tracing_submsgs[3] = {
&envoy_type_FractionalPercent_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_Tracing__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 11, 1},
{3, UPB_SIZE(8, 16), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_route_Tracing_msginit = {
&envoy_api_v2_route_Tracing_submsgs[0],
&envoy_api_v2_route_Tracing__fields[0],
UPB_SIZE(12, 24), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_VirtualCluster_submsgs[1] = {
&envoy_api_v2_route_HeaderMatcher_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_VirtualCluster__fields[4] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(16, 24), 0, 0, 9, 1},
{3, UPB_SIZE(0, 0), 0, 0, 14, 1},
{4, UPB_SIZE(24, 40), 0, 0, 11, 3},
};
const upb_msglayout envoy_api_v2_route_VirtualCluster_msginit = {
&envoy_api_v2_route_VirtualCluster_submsgs[0],
&envoy_api_v2_route_VirtualCluster__fields[0],
UPB_SIZE(32, 48), 4, false,
};
static const upb_msglayout *const envoy_api_v2_route_RateLimit_submsgs[2] = {
&envoy_api_v2_route_RateLimit_Action_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RateLimit__fields[3] = {
{1, UPB_SIZE(8, 16), 0, 1, 11, 1},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
{3, UPB_SIZE(12, 24), 0, 0, 11, 3},
};
const upb_msglayout envoy_api_v2_route_RateLimit_msginit = {
&envoy_api_v2_route_RateLimit_submsgs[0],
&envoy_api_v2_route_RateLimit__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_submsgs[6] = {
&envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit,
&envoy_api_v2_route_RateLimit_Action_GenericKey_msginit,
&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit,
&envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit,
&envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit,
&envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action__fields[6] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1},
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
{3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1},
{4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1},
{5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
{6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1},
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit = {
&envoy_api_v2_route_RateLimit_Action_submsgs[0],
&envoy_api_v2_route_RateLimit_Action__fields[0],
UPB_SIZE(8, 16), 6, false,
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit = {
NULL,
&envoy_api_v2_route_RateLimit_Action_RequestHeaders__fields[0],
UPB_SIZE(16, 32), 2, false,
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_GenericKey__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_GenericKey_msginit = {
NULL,
&envoy_api_v2_route_RateLimit_Action_GenericKey__fields[0],
UPB_SIZE(8, 16), 1, false,
};
static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[2] = {
&envoy_api_v2_route_HeaderMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 1, 11, 1},
{3, UPB_SIZE(12, 24), 0, 0, 11, 3},
};
const upb_msglayout envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit = {
&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_submsgs[0],
&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_api_v2_route_HeaderMatcher_submsgs[2] = {
&envoy_type_Int64Range_msginit,
&envoy_type_matcher_RegexMatcher_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_HeaderMatcher__fields[9] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{4, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
{5, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
{6, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 11, 1},
{7, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 8, 1},
{8, UPB_SIZE(0, 0), 0, 0, 8, 1},
{9, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
{10, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
{11, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 1, 11, 1},
};
const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit = {
&envoy_api_v2_route_HeaderMatcher_submsgs[0],
&envoy_api_v2_route_HeaderMatcher__fields[0],
UPB_SIZE(24, 48), 9, false,
};
static const upb_msglayout *const envoy_api_v2_route_QueryParameterMatcher_submsgs[2] = {
&envoy_type_matcher_StringMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_api_v2_route_QueryParameterMatcher__fields[5] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{3, UPB_SIZE(8, 16), 0, 0, 9, 1},
{4, UPB_SIZE(16, 32), 0, 1, 11, 1},
{5, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 11, 1},
{6, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 8, 1},
};
const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit = {
&envoy_api_v2_route_QueryParameterMatcher_submsgs[0],
&envoy_api_v2_route_QueryParameterMatcher__fields[0],
UPB_SIZE(32, 64), 5, false,
};
#include "upb/port_undef.inc"

File diff suppressed because it is too large Load Diff

@ -0,0 +1,59 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/srds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/api/v2/srds.upb.h"
#include "envoy/api/v2/discovery.upb.h"
#include "google/api/annotations.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_submsgs[1] = {
&envoy_api_v2_ScopedRouteConfiguration_Key_msginit,
};
static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
{3, UPB_SIZE(16, 32), 0, 0, 11, 1},
};
const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit = {
&envoy_api_v2_ScopedRouteConfiguration_submsgs[0],
&envoy_api_v2_ScopedRouteConfiguration__fields[0],
UPB_SIZE(24, 48), 3, false,
};
static const upb_msglayout *const envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[1] = {
&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit,
};
static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit = {
&envoy_api_v2_ScopedRouteConfiguration_Key_submsgs[0],
&envoy_api_v2_ScopedRouteConfiguration_Key__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[1] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
};
const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit = {
NULL,
&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[0],
UPB_SIZE(16, 32), 1, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,134 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/api/v2/srds.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_API_V2_SRDS_PROTO_UPB_H_
#define ENVOY_API_V2_SRDS_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_api_v2_ScopedRouteConfiguration;
struct envoy_api_v2_ScopedRouteConfiguration_Key;
struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment;
typedef struct envoy_api_v2_ScopedRouteConfiguration envoy_api_v2_ScopedRouteConfiguration;
typedef struct envoy_api_v2_ScopedRouteConfiguration_Key envoy_api_v2_ScopedRouteConfiguration_Key;
typedef struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment envoy_api_v2_ScopedRouteConfiguration_Key_Fragment;
extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit;
extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit;
extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit;
/* envoy.api.v2.ScopedRouteConfiguration */
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_new(upb_arena *arena) {
return (envoy_api_v2_ScopedRouteConfiguration *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena);
}
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_ScopedRouteConfiguration *ret = envoy_api_v2_ScopedRouteConfiguration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_serialize(const envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_route_configuration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); }
UPB_INLINE const envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_key(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_ScopedRouteConfiguration_Key*, UPB_SIZE(16, 32)); }
UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_name(envoy_api_v2_ScopedRouteConfiguration *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_route_configuration_name(envoy_api_v2_ScopedRouteConfiguration *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_key(envoy_api_v2_ScopedRouteConfiguration *msg, envoy_api_v2_ScopedRouteConfiguration_Key* value) {
UPB_FIELD_AT(msg, envoy_api_v2_ScopedRouteConfiguration_Key*, UPB_SIZE(16, 32)) = value;
}
UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_mutable_key(envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena) {
struct envoy_api_v2_ScopedRouteConfiguration_Key* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)envoy_api_v2_ScopedRouteConfiguration_key(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena);
if (!sub) return NULL;
envoy_api_v2_ScopedRouteConfiguration_set_key(msg, sub);
}
return sub;
}
/* envoy.api.v2.ScopedRouteConfiguration.Key */
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_new(upb_arena *arena) {
return (envoy_api_v2_ScopedRouteConfiguration_Key *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena);
}
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_ScopedRouteConfiguration_Key *ret = envoy_api_v2_ScopedRouteConfiguration_Key_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena, len);
}
UPB_INLINE const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* const* envoy_api_v2_ScopedRouteConfiguration_Key_fragments(const envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t *len) { return (const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_ScopedRouteConfiguration_Key_mutable_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t *len) {
return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_ScopedRouteConfiguration_Key_resize_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t len, upb_arena *arena) {
return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* envoy_api_v2_ScopedRouteConfiguration_Key_add_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, upb_arena *arena) {
struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
/* envoy.api.v2.ScopedRouteConfiguration.Key.Fragment */
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_new(upb_arena *arena) {
return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena);
}
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *ret = envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_serialize(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena, len);
}
typedef enum {
envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_string_key = 1,
envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_NOT_SET = 0
} envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases;
UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_case(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* msg) { return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); }
UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_has_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); }
UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); }
UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_set_string_key(envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_API_V2_SRDS_PROTO_UPB_H_ */

@ -0,0 +1,226 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/config/filter/accesslog/v2/accesslog.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/config/filter/accesslog/v2/accesslog.upb.h"
#include "envoy/api/v2/core/base.upb.h"
#include "envoy/api/v2/route/route.upb.h"
#include "envoy/type/percent.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/struct.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLog_submsgs[3] = {
&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit,
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLog__fields[4] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 11, 1},
{3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1},
{4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit = {
&envoy_config_filter_accesslog_v2_AccessLog_submsgs[0],
&envoy_config_filter_accesslog_v2_AccessLog__fields[0],
UPB_SIZE(24, 48), 4, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLogFilter_submsgs[11] = {
&envoy_config_filter_accesslog_v2_AndFilter_msginit,
&envoy_config_filter_accesslog_v2_DurationFilter_msginit,
&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit,
&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit,
&envoy_config_filter_accesslog_v2_HeaderFilter_msginit,
&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit,
&envoy_config_filter_accesslog_v2_OrFilter_msginit,
&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit,
&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit,
&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit,
&envoy_config_filter_accesslog_v2_TraceableFilter_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLogFilter__fields[11] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1},
{2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
{3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1},
{4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1},
{5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1},
{6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
{7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1},
{8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1},
{9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1},
{10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1},
{11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit = {
&envoy_config_filter_accesslog_v2_AccessLogFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_AccessLogFilter__fields[0],
UPB_SIZE(8, 16), 11, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_ComparisonFilter_submsgs[1] = {
&envoy_api_v2_core_RuntimeUInt32_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_ComparisonFilter__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
{2, UPB_SIZE(8, 8), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_ComparisonFilter_msginit = {
&envoy_config_filter_accesslog_v2_ComparisonFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_ComparisonFilter__fields[0],
UPB_SIZE(16, 16), 2, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_StatusCodeFilter_submsgs[1] = {
&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_StatusCodeFilter__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit = {
&envoy_config_filter_accesslog_v2_StatusCodeFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_StatusCodeFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_DurationFilter_submsgs[1] = {
&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_DurationFilter__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_DurationFilter_msginit = {
&envoy_config_filter_accesslog_v2_DurationFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_DurationFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
const upb_msglayout envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
const upb_msglayout envoy_config_filter_accesslog_v2_TraceableFilter_msginit = {
NULL,
NULL,
UPB_SIZE(0, 0), 0, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_RuntimeFilter_submsgs[1] = {
&envoy_type_FractionalPercent_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_RuntimeFilter__fields[3] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(12, 24), 0, 0, 11, 1},
{3, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_RuntimeFilter_msginit = {
&envoy_config_filter_accesslog_v2_RuntimeFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_RuntimeFilter__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_AndFilter_submsgs[1] = {
&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_AndFilter__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_filter_accesslog_v2_AndFilter_msginit = {
&envoy_config_filter_accesslog_v2_AndFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_AndFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_OrFilter_submsgs[1] = {
&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_OrFilter__fields[1] = {
{2, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_filter_accesslog_v2_OrFilter_msginit = {
&envoy_config_filter_accesslog_v2_OrFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_OrFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_HeaderFilter_submsgs[1] = {
&envoy_api_v2_route_HeaderMatcher_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_HeaderFilter__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_HeaderFilter_msginit = {
&envoy_config_filter_accesslog_v2_HeaderFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_HeaderFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_ResponseFlagFilter__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 3},
};
const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit = {
NULL,
&envoy_config_filter_accesslog_v2_ResponseFlagFilter__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_GrpcStatusFilter__fields[2] = {
{1, UPB_SIZE(4, 8), 0, 0, 14, 3},
{2, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit = {
NULL,
&envoy_config_filter_accesslog_v2_GrpcStatusFilter__fields[0],
UPB_SIZE(8, 16), 2, false,
};
static const upb_msglayout *const envoy_config_filter_accesslog_v2_ExtensionFilter_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_config_filter_accesslog_v2_ExtensionFilter__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit = {
&envoy_config_filter_accesslog_v2_ExtensionFilter_submsgs[0],
&envoy_config_filter_accesslog_v2_ExtensionFilter__fields[0],
UPB_SIZE(16, 32), 3, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,725 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/config/filter/accesslog/v2/accesslog.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_
#define ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_config_filter_accesslog_v2_AccessLog;
struct envoy_config_filter_accesslog_v2_AccessLogFilter;
struct envoy_config_filter_accesslog_v2_ComparisonFilter;
struct envoy_config_filter_accesslog_v2_StatusCodeFilter;
struct envoy_config_filter_accesslog_v2_DurationFilter;
struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter;
struct envoy_config_filter_accesslog_v2_TraceableFilter;
struct envoy_config_filter_accesslog_v2_RuntimeFilter;
struct envoy_config_filter_accesslog_v2_AndFilter;
struct envoy_config_filter_accesslog_v2_OrFilter;
struct envoy_config_filter_accesslog_v2_HeaderFilter;
struct envoy_config_filter_accesslog_v2_ResponseFlagFilter;
struct envoy_config_filter_accesslog_v2_GrpcStatusFilter;
struct envoy_config_filter_accesslog_v2_ExtensionFilter;
typedef struct envoy_config_filter_accesslog_v2_AccessLog envoy_config_filter_accesslog_v2_AccessLog;
typedef struct envoy_config_filter_accesslog_v2_AccessLogFilter envoy_config_filter_accesslog_v2_AccessLogFilter;
typedef struct envoy_config_filter_accesslog_v2_ComparisonFilter envoy_config_filter_accesslog_v2_ComparisonFilter;
typedef struct envoy_config_filter_accesslog_v2_StatusCodeFilter envoy_config_filter_accesslog_v2_StatusCodeFilter;
typedef struct envoy_config_filter_accesslog_v2_DurationFilter envoy_config_filter_accesslog_v2_DurationFilter;
typedef struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter envoy_config_filter_accesslog_v2_NotHealthCheckFilter;
typedef struct envoy_config_filter_accesslog_v2_TraceableFilter envoy_config_filter_accesslog_v2_TraceableFilter;
typedef struct envoy_config_filter_accesslog_v2_RuntimeFilter envoy_config_filter_accesslog_v2_RuntimeFilter;
typedef struct envoy_config_filter_accesslog_v2_AndFilter envoy_config_filter_accesslog_v2_AndFilter;
typedef struct envoy_config_filter_accesslog_v2_OrFilter envoy_config_filter_accesslog_v2_OrFilter;
typedef struct envoy_config_filter_accesslog_v2_HeaderFilter envoy_config_filter_accesslog_v2_HeaderFilter;
typedef struct envoy_config_filter_accesslog_v2_ResponseFlagFilter envoy_config_filter_accesslog_v2_ResponseFlagFilter;
typedef struct envoy_config_filter_accesslog_v2_GrpcStatusFilter envoy_config_filter_accesslog_v2_GrpcStatusFilter;
typedef struct envoy_config_filter_accesslog_v2_ExtensionFilter envoy_config_filter_accesslog_v2_ExtensionFilter;
extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_ComparisonFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_DurationFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_TraceableFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_RuntimeFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_AndFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_OrFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_HeaderFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit;
extern const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit;
struct envoy_api_v2_core_RuntimeUInt32;
struct envoy_api_v2_route_HeaderMatcher;
struct envoy_type_FractionalPercent;
struct google_protobuf_Any;
struct google_protobuf_Struct;
extern const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit;
extern const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit;
extern const upb_msglayout envoy_type_FractionalPercent_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
typedef enum {
envoy_config_filter_accesslog_v2_ComparisonFilter_EQ = 0,
envoy_config_filter_accesslog_v2_ComparisonFilter_GE = 1,
envoy_config_filter_accesslog_v2_ComparisonFilter_LE = 2
} envoy_config_filter_accesslog_v2_ComparisonFilter_Op;
typedef enum {
envoy_config_filter_accesslog_v2_GrpcStatusFilter_OK = 0,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_CANCELED = 1,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNKNOWN = 2,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_INVALID_ARGUMENT = 3,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_DEADLINE_EXCEEDED = 4,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_NOT_FOUND = 5,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_ALREADY_EXISTS = 6,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_PERMISSION_DENIED = 7,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_RESOURCE_EXHAUSTED = 8,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_FAILED_PRECONDITION = 9,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_ABORTED = 10,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_OUT_OF_RANGE = 11,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNIMPLEMENTED = 12,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_INTERNAL = 13,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNAVAILABLE = 14,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_DATA_LOSS = 15,
envoy_config_filter_accesslog_v2_GrpcStatusFilter_UNAUTHENTICATED = 16
} envoy_config_filter_accesslog_v2_GrpcStatusFilter_Status;
/* envoy.config.filter.accesslog.v2.AccessLog */
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_AccessLog *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_AccessLog *ret = envoy_config_filter_accesslog_v2_AccessLog_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AccessLog_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_AccessLog_serialize(const envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_AccessLog_msginit, arena, len);
}
typedef enum {
envoy_config_filter_accesslog_v2_AccessLog_config_type_config = 3,
envoy_config_filter_accesslog_v2_AccessLog_config_type_typed_config = 4,
envoy_config_filter_accesslog_v2_AccessLog_config_type_NOT_SET = 0
} envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases;
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases envoy_config_filter_accesslog_v2_AccessLog_config_type_case(const envoy_config_filter_accesslog_v2_AccessLog* msg) { return (envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 32)); }
UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_AccessLog_name(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); }
UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 4); }
UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); }
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_name(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, envoy_config_filter_accesslog_v2_AccessLogFilter* value) {
UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)) = value;
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_mutable_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)envoy_config_filter_accesslog_v2_AccessLog_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLog_set_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_config(envoy_config_filter_accesslog_v2_AccessLog *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3);
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_mutable_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_AccessLog_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLog_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(envoy_config_filter_accesslog_v2_AccessLog *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 4);
}
UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_mutable_typed_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_AccessLog_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.AccessLogFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_AccessLogFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_AccessLogFilter *ret = envoy_config_filter_accesslog_v2_AccessLogFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_AccessLogFilter_serialize(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena, len);
}
typedef enum {
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_status_code_filter = 1,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_duration_filter = 2,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_not_health_check_filter = 3,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_traceable_filter = 4,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_runtime_filter = 5,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_and_filter = 6,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_or_filter = 7,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_header_filter = 8,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_response_flag_filter = 9,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_grpc_status_filter = 10,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_extension_filter = 11,
envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_NOT_SET = 0
} envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases;
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_case(const envoy_config_filter_accesslog_v2_AccessLogFilter* msg) { return (envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
UPB_INLINE const envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); }
UPB_INLINE const envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_DurationFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); }
UPB_INLINE const envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_NotHealthCheckFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); }
UPB_INLINE const envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_TraceableFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); }
UPB_INLINE const envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_RuntimeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); }
UPB_INLINE const envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_AndFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); }
UPB_INLINE const envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_OrFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); }
UPB_INLINE const envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_HeaderFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); }
UPB_INLINE const envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ResponseFlagFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); }
UPB_INLINE const envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_GrpcStatusFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); }
UPB_INLINE const envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ExtensionFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); }
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_StatusCodeFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_StatusCodeFilter* sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_DurationFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_DurationFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_duration_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_DurationFilter* sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_check_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_NotHealthCheckFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_NotHealthCheckFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_not_health_check_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_check_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_TraceableFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_TraceableFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 4);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_traceable_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_TraceableFilter* sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_RuntimeFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_RuntimeFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 5);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_runtime_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_RuntimeFilter* sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_AndFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_AndFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 6);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_and_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_AndFilter* sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_OrFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_OrFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 7);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_or_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_OrFilter* sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_HeaderFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_HeaderFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_header_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_HeaderFilter* sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_flag_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_ResponseFlagFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_ResponseFlagFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_response_flag_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_flag_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_GrpcStatusFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_GrpcStatusFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 10);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_grpc_status_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status_filter(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_ExtensionFilter* value) {
UPB_WRITE_ONEOF(msg, envoy_config_filter_accesslog_v2_ExtensionFilter*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 11);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_extension_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_ExtensionFilter* sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_filter(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.ComparisonFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_ComparisonFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_ComparisonFilter *ret = envoy_config_filter_accesslog_v2_ComparisonFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_ComparisonFilter_serialize(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena, len);
}
UPB_INLINE int32_t envoy_config_filter_accesslog_v2_ComparisonFilter_op(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
UPB_INLINE const struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_value(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)); }
UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_op(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, int32_t value) {
UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, struct envoy_api_v2_core_RuntimeUInt32* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)) = value;
}
UPB_INLINE struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_mutable_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena) {
struct envoy_api_v2_core_RuntimeUInt32* sub = (struct envoy_api_v2_core_RuntimeUInt32*)envoy_config_filter_accesslog_v2_ComparisonFilter_value(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_core_RuntimeUInt32*)upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.StatusCodeFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_StatusCodeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_StatusCodeFilter *ret = envoy_config_filter_accesslog_v2_StatusCodeFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_StatusCodeFilter_serialize(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena, len);
}
UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) {
UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_mutable_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.DurationFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_DurationFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_DurationFilter *ret = envoy_config_filter_accesslog_v2_DurationFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_DurationFilter_serialize(const envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena, len);
}
UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_comparison(const envoy_config_filter_accesslog_v2_DurationFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) {
UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_mutable_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_DurationFilter_comparison(msg);
if (sub == NULL) {
sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.NotHealthCheckFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_NotHealthCheckFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_NotHealthCheckFilter *ret = envoy_config_filter_accesslog_v2_NotHealthCheckFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_serialize(const envoy_config_filter_accesslog_v2_NotHealthCheckFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena, len);
}
/* envoy.config.filter.accesslog.v2.TraceableFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_TraceableFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_TraceableFilter *ret = envoy_config_filter_accesslog_v2_TraceableFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_TraceableFilter_serialize(const envoy_config_filter_accesslog_v2_TraceableFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena, len);
}
/* envoy.config.filter.accesslog.v2.RuntimeFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_RuntimeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_RuntimeFilter *ret = envoy_config_filter_accesslog_v2_RuntimeFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_RuntimeFilter_serialize(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_RuntimeFilter_runtime_key(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); }
UPB_INLINE const struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_RuntimeFilter_use_independent_randomness(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_runtime_key(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, struct envoy_type_FractionalPercent* value) {
UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)) = value;
}
UPB_INLINE struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_mutable_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena) {
struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(msg);
if (sub == NULL) {
sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_use_independent_randomness(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
/* envoy.config.filter.accesslog.v2.AndFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_AndFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_AndFilter *ret = envoy_config_filter_accesslog_v2_AndFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_AndFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_AndFilter_serialize(const envoy_config_filter_accesslog_v2_AndFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_AndFilter_msginit, arena, len);
}
UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_AndFilter_filters(const envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_mutable_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) {
return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_resize_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t len, upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AndFilter_add_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
/* envoy.config.filter.accesslog.v2.OrFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_OrFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_OrFilter *ret = envoy_config_filter_accesslog_v2_OrFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_OrFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_OrFilter_serialize(const envoy_config_filter_accesslog_v2_OrFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_OrFilter_msginit, arena, len);
}
UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_OrFilter_filters(const envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_mutable_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) {
return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_resize_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t len, upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_OrFilter_add_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, upb_arena *arena) {
struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
/* envoy.config.filter.accesslog.v2.HeaderFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_HeaderFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_HeaderFilter *ret = envoy_config_filter_accesslog_v2_HeaderFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_HeaderFilter_serialize(const envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena, len);
}
UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_header(const envoy_config_filter_accesslog_v2_HeaderFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_config_filter_accesslog_v2_HeaderFilter_set_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, struct envoy_api_v2_route_HeaderMatcher* value) {
UPB_FIELD_AT(msg, struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_mutable_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena) {
struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_filter_accesslog_v2_HeaderFilter_header(msg);
if (sub == NULL) {
sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_HeaderFilter_set_header(msg, sub);
}
return sub;
}
/* envoy.config.filter.accesslog.v2.ResponseFlagFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_ResponseFlagFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_ResponseFlagFilter *ret = envoy_config_filter_accesslog_v2_ResponseFlagFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_ResponseFlagFilter_serialize(const envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena, len);
}
UPB_INLINE upb_strview const* envoy_config_filter_accesslog_v2_ResponseFlagFilter_flags(const envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_mutable_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_resize_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
}
UPB_INLINE bool envoy_config_filter_accesslog_v2_ResponseFlagFilter_add_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
}
/* envoy.config.filter.accesslog.v2.GrpcStatusFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_GrpcStatusFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_GrpcStatusFilter *ret = envoy_config_filter_accesslog_v2_GrpcStatusFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_GrpcStatusFilter_serialize(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena, len);
}
UPB_INLINE int32_t const* envoy_config_filter_accesslog_v2_GrpcStatusFilter_statuses(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_exclude(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); }
UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_mutable_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_resize_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t len, upb_arena *arena) {
return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(8, 8), UPB_TYPE_ENUM, arena);
}
UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_add_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, int32_t val, upb_arena *arena) {
return _upb_array_append_accessor(
msg, UPB_SIZE(4, 8), UPB_SIZE(8, 8), UPB_TYPE_ENUM, &val, arena);
}
UPB_INLINE void envoy_config_filter_accesslog_v2_GrpcStatusFilter_set_exclude(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, bool value) {
UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value;
}
/* envoy.config.filter.accesslog.v2.ExtensionFilter */
UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_new(upb_arena *arena) {
return (envoy_config_filter_accesslog_v2_ExtensionFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena);
}
UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_filter_accesslog_v2_ExtensionFilter *ret = envoy_config_filter_accesslog_v2_ExtensionFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_filter_accesslog_v2_ExtensionFilter_serialize(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena, len);
}
typedef enum {
envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_config = 2,
envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_typed_config = 3,
envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_NOT_SET = 0
} envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases;
UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_case(const envoy_config_filter_accesslog_v2_ExtensionFilter* msg) { return (envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_ExtensionFilter_name(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); }
UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); }
UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_name(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, struct google_protobuf_Struct* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_mutable_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_ExtensionFilter_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, struct google_protobuf_Any* value) {
UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_mutable_typed_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_config(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ */

@ -0,0 +1,291 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h"
#include "envoy/api/v2/core/config_source.upb.h"
#include "envoy/api/v2/core/protocol.upb.h"
#include "envoy/api/v2/rds.upb.h"
#include "envoy/api/v2/srds.upb.h"
#include "envoy/config/filter/accesslog/v2/accesslog.upb.h"
#include "envoy/type/percent.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_submsgs[22] = {
&envoy_api_v2_RouteConfiguration_msginit,
&envoy_api_v2_core_Http1ProtocolOptions_msginit,
&envoy_api_v2_core_Http2ProtocolOptions_msginit,
&envoy_api_v2_core_HttpProtocolOptions_msginit,
&envoy_config_filter_accesslog_v2_AccessLog_msginit,
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit,
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit,
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit,
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit,
&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit,
&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit,
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit,
&google_protobuf_BoolValue_msginit,
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[34] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
{2, UPB_SIZE(36, 40), 0, 0, 9, 1},
{3, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 10, 11, 1},
{4, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 0, 11, 1},
{5, UPB_SIZE(124, 216), 0, 9, 11, 3},
{6, UPB_SIZE(60, 88), 0, 12, 11, 1},
{7, UPB_SIZE(64, 96), 0, 7, 11, 1},
{8, UPB_SIZE(68, 104), 0, 1, 11, 1},
{9, UPB_SIZE(72, 112), 0, 2, 11, 1},
{10, UPB_SIZE(44, 56), 0, 0, 9, 1},
{11, UPB_SIZE(76, 120), 0, 13, 11, 1},
{12, UPB_SIZE(80, 128), 0, 13, 11, 1},
{13, UPB_SIZE(128, 224), 0, 4, 11, 3},
{14, UPB_SIZE(84, 136), 0, 12, 11, 1},
{15, UPB_SIZE(88, 144), 0, 12, 11, 1},
{16, UPB_SIZE(8, 8), 0, 0, 14, 1},
{17, UPB_SIZE(92, 152), 0, 6, 11, 1},
{18, UPB_SIZE(28, 28), 0, 0, 8, 1},
{19, UPB_SIZE(24, 24), 0, 0, 13, 1},
{20, UPB_SIZE(29, 29), 0, 0, 8, 1},
{21, UPB_SIZE(30, 30), 0, 0, 8, 1},
{22, UPB_SIZE(52, 72), 0, 0, 9, 1},
{23, UPB_SIZE(132, 232), 0, 8, 11, 3},
{24, UPB_SIZE(96, 160), 0, 13, 11, 1},
{25, UPB_SIZE(100, 168), 0, 5, 11, 1},
{26, UPB_SIZE(104, 176), 0, 13, 11, 1},
{28, UPB_SIZE(108, 184), 0, 13, 11, 1},
{29, UPB_SIZE(112, 192), 0, 14, 11, 1},
{30, UPB_SIZE(116, 200), 0, 12, 11, 1},
{31, UPB_SIZE(136, 240), UPB_SIZE(-141, -249), 11, 11, 1},
{32, UPB_SIZE(31, 31), 0, 0, 8, 1},
{33, UPB_SIZE(32, 32), 0, 0, 8, 1},
{34, UPB_SIZE(16, 16), 0, 0, 14, 1},
{35, UPB_SIZE(120, 208), 0, 3, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[0],
UPB_SIZE(144, 256), 34, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[4] = {
&envoy_type_Percent_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[7] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
{2, UPB_SIZE(28, 48), 0, 0, 9, 3},
{3, UPB_SIZE(12, 16), 0, 0, 11, 1},
{4, UPB_SIZE(16, 24), 0, 0, 11, 1},
{5, UPB_SIZE(20, 32), 0, 0, 11, 1},
{6, UPB_SIZE(8, 8), 0, 0, 8, 1},
{7, UPB_SIZE(24, 40), 0, 1, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing__fields[0],
UPB_SIZE(32, 56), 7, false,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit = {
NULL,
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig__fields[0],
UPB_SIZE(1, 1), 1, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[1] = {
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails__fields[5] = {
{1, UPB_SIZE(4, 8), 0, 0, 11, 1},
{3, UPB_SIZE(0, 0), 0, 0, 8, 1},
{4, UPB_SIZE(1, 1), 0, 0, 8, 1},
{5, UPB_SIZE(2, 2), 0, 0, 8, 1},
{6, UPB_SIZE(3, 3), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails__fields[0],
UPB_SIZE(8, 16), 5, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_submsgs[2] = {
&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(12, 24), 0, 0, 11, 3},
{3, UPB_SIZE(8, 16), 0, 1, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig__fields[0],
UPB_SIZE(16, 32), 3, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_Rds_submsgs[1] = {
&envoy_api_v2_core_ConfigSource_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_Rds__fields[2] = {
{1, UPB_SIZE(8, 16), 0, 0, 11, 1},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_Rds_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_Rds_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_Rds__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_submsgs[1] = {
&envoy_api_v2_ScopedRouteConfiguration_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_submsgs[4] = {
&envoy_api_v2_core_ConfigSource_msginit,
&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit,
&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit,
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes__fields[5] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 3, 11, 1},
{3, UPB_SIZE(12, 24), 0, 0, 11, 1},
{4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1},
{5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes__fields[0],
UPB_SIZE(24, 48), 5, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_submsgs[1] = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[1] = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[1] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[0],
UPB_SIZE(8, 16), 1, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[1] = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[4] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
{3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 13, 1},
{4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[0],
UPB_SIZE(24, 48), 4, false,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit = {
NULL,
&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_ScopedRds_submsgs[1] = {
&envoy_api_v2_core_ConfigSource_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRds__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_ScopedRds__fields[0],
UPB_SIZE(4, 8), 1, false,
};
static const upb_msglayout *const envoy_config_filter_network_http_connection_manager_v2_HttpFilter_submsgs[2] = {
&google_protobuf_Any_msginit,
&google_protobuf_Struct_msginit,
};
static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
{4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit = {
&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_submsgs[0],
&envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[0],
UPB_SIZE(16, 32), 3, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,31 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/config/listener/v2/api_listener.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/config/listener/v2/api_listener.upb.h"
#include "google/protobuf/any.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_config_listener_v2_ApiListener_submsgs[1] = {
&google_protobuf_Any_msginit,
};
static const upb_msglayout_field envoy_config_listener_v2_ApiListener__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v2_ApiListener_msginit = {
&envoy_config_listener_v2_ApiListener_submsgs[0],
&envoy_config_listener_v2_ApiListener__fields[0],
UPB_SIZE(4, 8), 1, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,65 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/config/listener/v2/api_listener.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_
#define ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_config_listener_v2_ApiListener;
typedef struct envoy_config_listener_v2_ApiListener envoy_config_listener_v2_ApiListener;
extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit;
struct google_protobuf_Any;
extern const upb_msglayout google_protobuf_Any_msginit;
/* envoy.config.listener.v2.ApiListener */
UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_new(upb_arena *arena) {
return (envoy_config_listener_v2_ApiListener *)upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena);
}
UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_config_listener_v2_ApiListener *ret = envoy_config_listener_v2_ApiListener_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v2_ApiListener_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_config_listener_v2_ApiListener_serialize(const envoy_config_listener_v2_ApiListener *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v2_ApiListener_msginit, arena, len);
}
UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_api_listener(const envoy_config_listener_v2_ApiListener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_config_listener_v2_ApiListener_set_api_listener(envoy_config_listener_v2_ApiListener *msg, struct google_protobuf_Any* value) {
UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_mutable_api_listener(envoy_config_listener_v2_ApiListener *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v2_ApiListener_api_listener(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena);
if (!sub) return NULL;
envoy_config_listener_v2_ApiListener_set_api_listener(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ */

@ -0,0 +1,47 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/type/matcher/regex.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/type/matcher/regex.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_type_matcher_RegexMatcher_submsgs[1] = {
&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit,
};
static const upb_msglayout_field envoy_type_matcher_RegexMatcher__fields[2] = {
{1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
{2, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
const upb_msglayout envoy_type_matcher_RegexMatcher_msginit = {
&envoy_type_matcher_RegexMatcher_submsgs[0],
&envoy_type_matcher_RegexMatcher__fields[0],
UPB_SIZE(16, 32), 2, false,
};
static const upb_msglayout *const envoy_type_matcher_RegexMatcher_GoogleRE2_submsgs[1] = {
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_type_matcher_RegexMatcher_GoogleRE2__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 1},
};
const upb_msglayout envoy_type_matcher_RegexMatcher_GoogleRE2_msginit = {
&envoy_type_matcher_RegexMatcher_GoogleRE2_submsgs[0],
&envoy_type_matcher_RegexMatcher_GoogleRE2__fields[0],
UPB_SIZE(4, 8), 1, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,108 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/type/matcher/regex.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_
#define ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_type_matcher_RegexMatcher;
struct envoy_type_matcher_RegexMatcher_GoogleRE2;
typedef struct envoy_type_matcher_RegexMatcher envoy_type_matcher_RegexMatcher;
typedef struct envoy_type_matcher_RegexMatcher_GoogleRE2 envoy_type_matcher_RegexMatcher_GoogleRE2;
extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit;
extern const upb_msglayout envoy_type_matcher_RegexMatcher_GoogleRE2_msginit;
struct google_protobuf_UInt32Value;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
/* envoy.type.matcher.RegexMatcher */
UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_new(upb_arena *arena) {
return (envoy_type_matcher_RegexMatcher *)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena);
}
UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_type_matcher_RegexMatcher *ret = envoy_type_matcher_RegexMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_RegexMatcher_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_type_matcher_RegexMatcher_serialize(const envoy_type_matcher_RegexMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_RegexMatcher_msginit, arena, len);
}
typedef enum {
envoy_type_matcher_RegexMatcher_engine_type_google_re2 = 1,
envoy_type_matcher_RegexMatcher_engine_type_NOT_SET = 0
} envoy_type_matcher_RegexMatcher_engine_type_oneofcases;
UPB_INLINE envoy_type_matcher_RegexMatcher_engine_type_oneofcases envoy_type_matcher_RegexMatcher_engine_type_case(const envoy_type_matcher_RegexMatcher* msg) { return (envoy_type_matcher_RegexMatcher_engine_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); }
UPB_INLINE bool envoy_type_matcher_RegexMatcher_has_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); }
UPB_INLINE const envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); }
UPB_INLINE upb_strview envoy_type_matcher_RegexMatcher_regex(const envoy_type_matcher_RegexMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_type_matcher_RegexMatcher_set_google_re2(envoy_type_matcher_RegexMatcher *msg, envoy_type_matcher_RegexMatcher_GoogleRE2* value) {
UPB_WRITE_ONEOF(msg, envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1);
}
UPB_INLINE struct envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_mutable_google_re2(envoy_type_matcher_RegexMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_RegexMatcher_GoogleRE2* sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)envoy_type_matcher_RegexMatcher_google_re2(msg);
if (sub == NULL) {
sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena);
if (!sub) return NULL;
envoy_type_matcher_RegexMatcher_set_google_re2(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_type_matcher_RegexMatcher_set_regex(envoy_type_matcher_RegexMatcher *msg, upb_strview value) {
UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
}
/* envoy.type.matcher.RegexMatcher.GoogleRE2 */
UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_new(upb_arena *arena) {
return (envoy_type_matcher_RegexMatcher_GoogleRE2 *)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena);
}
UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_type_matcher_RegexMatcher_GoogleRE2 *ret = envoy_type_matcher_RegexMatcher_GoogleRE2_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_type_matcher_RegexMatcher_GoogleRE2_serialize(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena, len);
}
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); }
UPB_INLINE void envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, struct google_protobuf_UInt32Value* value) {
UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(msg);
if (sub == NULL) {
sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
if (!sub) return NULL;
envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(msg, sub);
}
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ */

@ -0,0 +1,50 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/type/matcher/string.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/type/matcher/string.upb.h"
#include "envoy/type/matcher/regex.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_type_matcher_StringMatcher_submsgs[1] = {
&envoy_type_matcher_RegexMatcher_msginit,
};
static const upb_msglayout_field envoy_type_matcher_StringMatcher__fields[5] = {
{1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
{2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
{3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
{4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
{5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1},
};
const upb_msglayout envoy_type_matcher_StringMatcher_msginit = {
&envoy_type_matcher_StringMatcher_submsgs[0],
&envoy_type_matcher_StringMatcher__fields[0],
UPB_SIZE(16, 32), 5, false,
};
static const upb_msglayout *const envoy_type_matcher_ListStringMatcher_submsgs[1] = {
&envoy_type_matcher_StringMatcher_msginit,
};
static const upb_msglayout_field envoy_type_matcher_ListStringMatcher__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 11, 3},
};
const upb_msglayout envoy_type_matcher_ListStringMatcher_msginit = {
&envoy_type_matcher_ListStringMatcher_submsgs[0],
&envoy_type_matcher_ListStringMatcher__fields[0],
UPB_SIZE(4, 8), 1, false,
};
#include "upb/port_undef.inc"

@ -0,0 +1,129 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* envoy/type/matcher/string.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_
#define ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_
#include "upb/generated_util.h"
#include "upb/msg.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct envoy_type_matcher_StringMatcher;
struct envoy_type_matcher_ListStringMatcher;
typedef struct envoy_type_matcher_StringMatcher envoy_type_matcher_StringMatcher;
typedef struct envoy_type_matcher_ListStringMatcher envoy_type_matcher_ListStringMatcher;
extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit;
extern const upb_msglayout envoy_type_matcher_ListStringMatcher_msginit;
struct envoy_type_matcher_RegexMatcher;
extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit;
/* envoy.type.matcher.StringMatcher */
UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_new(upb_arena *arena) {
return (envoy_type_matcher_StringMatcher *)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena);
}
UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_type_matcher_StringMatcher *ret = envoy_type_matcher_StringMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_StringMatcher_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_type_matcher_StringMatcher_serialize(const envoy_type_matcher_StringMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_StringMatcher_msginit, arena, len);
}
typedef enum {
envoy_type_matcher_StringMatcher_match_pattern_exact = 1,
envoy_type_matcher_StringMatcher_match_pattern_prefix = 2,
envoy_type_matcher_StringMatcher_match_pattern_suffix = 3,
envoy_type_matcher_StringMatcher_match_pattern_regex = 4,
envoy_type_matcher_StringMatcher_match_pattern_safe_regex = 5,
envoy_type_matcher_StringMatcher_match_pattern_NOT_SET = 0
} envoy_type_matcher_StringMatcher_match_pattern_oneofcases;
UPB_INLINE envoy_type_matcher_StringMatcher_match_pattern_oneofcases envoy_type_matcher_StringMatcher_match_pattern_case(const envoy_type_matcher_StringMatcher* msg) { return (envoy_type_matcher_StringMatcher_match_pattern_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); }
UPB_INLINE bool envoy_type_matcher_StringMatcher_has_exact(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); }
UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_exact(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); }
UPB_INLINE bool envoy_type_matcher_StringMatcher_has_prefix(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); }
UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_prefix(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); }
UPB_INLINE bool envoy_type_matcher_StringMatcher_has_suffix(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); }
UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_suffix(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, upb_strview_make("", strlen(""))); }
UPB_INLINE bool envoy_type_matcher_StringMatcher_has_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 4); }
UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, upb_strview_make("", strlen(""))); }
UPB_INLINE bool envoy_type_matcher_StringMatcher_has_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); }
UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, NULL); }
UPB_INLINE void envoy_type_matcher_StringMatcher_set_exact(envoy_type_matcher_StringMatcher *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
}
UPB_INLINE void envoy_type_matcher_StringMatcher_set_prefix(envoy_type_matcher_StringMatcher *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
}
UPB_INLINE void envoy_type_matcher_StringMatcher_set_suffix(envoy_type_matcher_StringMatcher *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3);
}
UPB_INLINE void envoy_type_matcher_StringMatcher_set_regex(envoy_type_matcher_StringMatcher *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 4);
}
UPB_INLINE void envoy_type_matcher_StringMatcher_set_safe_regex(envoy_type_matcher_StringMatcher *msg, struct envoy_type_matcher_RegexMatcher* value) {
UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 5);
}
UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_mutable_safe_regex(envoy_type_matcher_StringMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_type_matcher_StringMatcher_safe_regex(msg);
if (sub == NULL) {
sub = (struct envoy_type_matcher_RegexMatcher*)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena);
if (!sub) return NULL;
envoy_type_matcher_StringMatcher_set_safe_regex(msg, sub);
}
return sub;
}
/* envoy.type.matcher.ListStringMatcher */
UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_new(upb_arena *arena) {
return (envoy_type_matcher_ListStringMatcher *)upb_msg_new(&envoy_type_matcher_ListStringMatcher_msginit, arena);
}
UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_parse(const char *buf, size_t size,
upb_arena *arena) {
envoy_type_matcher_ListStringMatcher *ret = envoy_type_matcher_ListStringMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_ListStringMatcher_msginit, arena)) ? ret : NULL;
}
UPB_INLINE char *envoy_type_matcher_ListStringMatcher_serialize(const envoy_type_matcher_ListStringMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_ListStringMatcher_msginit, arena, len);
}
UPB_INLINE const envoy_type_matcher_StringMatcher* const* envoy_type_matcher_ListStringMatcher_patterns(const envoy_type_matcher_ListStringMatcher *msg, size_t *len) { return (const envoy_type_matcher_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_mutable_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t *len) {
return (envoy_type_matcher_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_resize_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t len, upb_arena *arena) {
return (envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
}
UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_type_matcher_ListStringMatcher_add_patterns(envoy_type_matcher_ListStringMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena);
bool ok = _upb_array_append_accessor(
msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
if (!ok) return NULL;
return sub;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ */

@ -46,6 +46,16 @@ grpc_proto_library(
well_known_protos = True,
)
grpc_proto_library(
name = "lds_rds_for_test_proto",
srcs = [
"lds_rds_for_test.proto",
],
has_services = True,
well_known_protos = True,
deps = ["cds_for_test_proto"],
)
grpc_proto_library(
name = "lrs_for_test_proto",
srcs = [

@ -0,0 +1,149 @@
// 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 eds protocol and its dependency.
//
// TODO(juanlishen): This file is a hack to avoid a problem we're
// currently having where we can't depend on a proto file in an external
// repo due to bazel limitations. Once that's fixed, this should be
// removed. Until this, it should be used in the gRPC tests only, or else it
// will cause a conflict due to the same proto messages being defined in
// multiple files in the same binary.
syntax = "proto3";
package envoy.api.v2;
import "google/protobuf/any.proto";
import "src/proto/grpc/testing/xds/cds_for_test.proto";
message RouteMatch {
oneof path_specifier {
// If specified, the route is a prefix rule meaning that the prefix must
// match the beginning of the *:path* header.
string prefix = 1;
}
}
message RouteAction {
oneof cluster_specifier {
// Indicates the upstream cluster to which the request should be routed
// to.
string cluster = 1;
// Envoy will determine the cluster to route to by reading the value of the
// HTTP header named by cluster_header from the request headers. If the
// header is not found or the referenced cluster does not exist, Envoy will
// return a 404 response.
//
// .. attention::
//
// Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1
// *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead.
string cluster_header = 2;
}
}
message RedirectAction {}
message Route {
RouteMatch match = 1;
oneof action {
// Route request to some upstream cluster.
RouteAction route = 2;
// Return a redirect.
RedirectAction redirect = 3;
}
}
message VirtualHost {
repeated string domains = 2;
repeated Route routes = 3;
}
message Rds {
// Configuration source specifier for RDS.
ConfigSource config_source = 1;
// The name of the route configuration. This name will be passed to the RDS
// API. This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations.
string route_config_name = 2;
}
message RouteConfiguration {
// The name of the route configuration. For example, it might match
// :ref:`route_config_name
// <envoy_api_field_config.filter.network.http_connection_manager.v2.Rds.route_config_name>` in
// :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated VirtualHost virtual_hosts = 2;
}
message ScopedRoutes {}
message HttpConnectionManager {
oneof route_specifier {
// The connection managers route table will be dynamically loaded via the RDS API.
Rds rds = 3;
// The route table for the connection manager is static and is specified in this property.
RouteConfiguration route_config = 4;
// A route table will be dynamically assigned to each request based on request attributes
// (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are
// specified in this message.
ScopedRoutes scoped_routes = 31;
}
}
message ApiListener {
// The type in this field determines the type of API listener. At present, the following
// types are supported:
// envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP)
// [#next-major-version: In the v3 API, replace this Any field with a oneof containing the
// specific config message for each type of API listener. We could not do this in v2 because
// it would have caused circular dependencies for go protos: lds.proto depends on this file,
// and http_connection_manager.proto depends on rds.proto, which is in the same directory as
// lds.proto, so lds.proto cannot depend on this file.]
google.protobuf.Any api_listener = 1;
}
message Listener {
string name = 1;
// Used to represent an API listener, which is used in non-proxy clients. The type of API
// exposed to the non-proxy application depends on the type of API listener.
// When this field is set, no other field except for :ref:`name<envoy_api_field_Listener.name>`
// should be set.
//
// .. note::
//
// Currently only one ApiListener can be installed; and it can only be done via bootstrap config,
// not LDS.
//
// [#next-major-version: In the v3 API, instead of this messy approach where the socket
// listener fields are directly in the top-level Listener message and the API listener types
// are in the ApiListener message, the socket listener messages should be in their own message,
// and the top-level Listener should essentially be a oneof that selects between the
// socket listener and the various types of API listener. That way, a given Listener message
// can structurally only contain the fields of the relevant type.]
ApiListener api_listener = 19;
}

@ -133,9 +133,20 @@ CORE_SOURCE_FILES = [
'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/api/v2/lds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c',
'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c',
'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/type/http.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/string.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',

@ -518,6 +518,7 @@ grpc_cc_test(
"//src/proto/grpc/testing/xds:ads_for_test_proto",
"//src/proto/grpc/testing/xds:cds_for_test_proto",
"//src/proto/grpc/testing/xds:eds_for_test_proto",
"//src/proto/grpc/testing/xds:lds_rds_for_test_proto",
"//src/proto/grpc/testing/xds:lrs_for_test_proto",
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",

@ -38,6 +38,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/ext/filters/client_channel/server_address.h"
#include "src/core/ext/filters/client_channel/xds/xds_api.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/gprpp/map.h"
@ -56,6 +57,7 @@
#include "src/proto/grpc/testing/xds/ads_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/cds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.h"
#include <gmock/gmock.h>
@ -89,6 +91,10 @@ using ::envoy::api::v2::ClusterLoadAssignment;
using ::envoy::api::v2::DiscoveryRequest;
using ::envoy::api::v2::DiscoveryResponse;
using ::envoy::api::v2::FractionalPercent;
using ::envoy::api::v2::HttpConnectionManager;
using ::envoy::api::v2::Listener;
using ::envoy::api::v2::RouteConfiguration;
using ::envoy::api::v2::VirtualHost;
using ::envoy::service::discovery::v2::AggregatedDiscoveryService;
using ::envoy::service::load_stats::v2::ClusterStats;
using ::envoy::service::load_stats::v2::LoadReportingService;
@ -96,6 +102,9 @@ using ::envoy::service::load_stats::v2::LoadStatsRequest;
using ::envoy::service::load_stats::v2::LoadStatsResponse;
using ::envoy::service::load_stats::v2::UpstreamLocalityStats;
constexpr char kLdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Listener";
constexpr char kRdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.RouteConfiguration";
constexpr char kCdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.Cluster";
constexpr char kEdsTypeUrl[] =
"type.googleapis.com/envoy.api.v2.ClusterLoadAssignment";
@ -382,6 +391,22 @@ class AdsServiceImpl : public AdsService {
using ResponseDelayPair = std::pair<DiscoveryResponse, int>;
AdsServiceImpl(bool enable_load_reporting) {
// Construct RDS response data.
default_route_config_.set_name("application_target_name");
auto* virtual_host = default_route_config_.add_virtual_hosts();
virtual_host->add_domains("*");
auto* route = virtual_host->add_routes();
route->mutable_match()->set_prefix("");
route->mutable_route()->set_cluster("application_target_name");
rds_response_data_ = {
{"application_target_name", default_route_config_},
};
// Construct LDS response data (with inlined RDS result).
default_listener_ = BuildListener(default_route_config_);
lds_response_data_ = {
{"application_target_name", default_listener_},
};
// Construct CDS response data.
default_cluster_.set_name("application_target_name");
default_cluster_.set_type(envoy::api::v2::Cluster::EDS);
default_cluster_.mutable_eds_cluster_config()
@ -396,6 +421,56 @@ class AdsServiceImpl : public AdsService {
};
}
void HandleLdsRequest(DiscoveryRequest* request, Stream* stream) {
gpr_log(GPR_INFO, "ADS[%p]: received LDS request '%s'", this,
request->DebugString().c_str());
const std::string version_str = "version_1";
const std::string nonce_str = "nonce_1";
grpc_core::MutexLock lock(&ads_mu_);
if (lds_response_state_ == NOT_SENT) {
DiscoveryResponse response;
response.set_type_url(kLdsTypeUrl);
response.set_version_info(version_str);
response.set_nonce(nonce_str);
for (const auto& server_name : request->resource_names()) {
auto iter = lds_response_data_.find(server_name);
if (iter == lds_response_data_.end()) continue;
response.add_resources()->PackFrom(iter->second);
}
stream->Write(response);
lds_response_state_ = SENT;
} else if (lds_response_state_ == SENT) {
GPR_ASSERT(!request->response_nonce().empty());
lds_response_state_ =
request->version_info() == version_str ? ACKED : NACKED;
}
}
void HandleRdsRequest(DiscoveryRequest* request, Stream* stream) {
gpr_log(GPR_INFO, "ADS[%p]: received RDS request '%s'", this,
request->DebugString().c_str());
const std::string version_str = "version_1";
const std::string nonce_str = "nonce_1";
grpc_core::MutexLock lock(&ads_mu_);
if (rds_response_state_ == NOT_SENT) {
DiscoveryResponse response;
response.set_type_url(kRdsTypeUrl);
response.set_version_info(version_str);
response.set_nonce(nonce_str);
for (const auto& route_config_name : request->resource_names()) {
auto iter = rds_response_data_.find(route_config_name);
if (iter == rds_response_data_.end()) continue;
response.add_resources()->PackFrom(iter->second);
}
stream->Write(response);
rds_response_state_ = SENT;
} else if (rds_response_state_ == SENT) {
GPR_ASSERT(!request->response_nonce().empty());
rds_response_state_ =
request->version_info() == version_str ? ACKED : NACKED;
}
}
void HandleCdsRequest(DiscoveryRequest* request, Stream* stream) {
gpr_log(GPR_INFO, "ADS[%p]: received CDS request '%s'", this,
request->DebugString().c_str());
@ -465,7 +540,11 @@ class AdsServiceImpl : public AdsService {
bool eds_sent = false;
while (!eds_sent || cds_response_state_ == SENT) {
if (!stream->Read(&request)) return;
if (request.type_url() == kCdsTypeUrl) {
if (request.type_url() == kLdsTypeUrl) {
HandleLdsRequest(&request, stream);
} else if (request.type_url() == kRdsTypeUrl) {
HandleRdsRequest(&request, stream);
} else if (request.type_url() == kCdsTypeUrl) {
HandleCdsRequest(&request, stream);
} else if (request.type_url() == kEdsTypeUrl) {
HandleEdsRequest(&request, stream);
@ -480,11 +559,20 @@ class AdsServiceImpl : public AdsService {
return Status::OK;
}
Cluster GetDefaultCluster() const { return default_cluster_; }
Listener default_listener() const { return default_listener_; }
RouteConfiguration default_route_config() const {
return default_route_config_;
}
Cluster default_cluster() const { return default_cluster_; }
void SetCdsResponse(
std::map<std::string /*cluster_name*/, Cluster> cds_response_data) {
cds_response_data_ = std::move(cds_response_data);
ResponseState lds_response_state() {
grpc_core::MutexLock lock(&ads_mu_);
return lds_response_state_;
}
ResponseState rds_response_state() {
grpc_core::MutexLock lock(&ads_mu_);
return rds_response_state_;
}
ResponseState cds_response_state() {
@ -492,12 +580,48 @@ class AdsServiceImpl : public AdsService {
return cds_response_state_;
}
void SetLdsResponse(
std::map<std::string /*server_name*/, Listener> lds_response_data) {
lds_response_data_ = std::move(lds_response_data);
}
void SetRdsResponse(
std::map<std::string /*route_config_name*/, RouteConfiguration>
rds_response_data) {
rds_response_data_ = std::move(rds_response_data);
}
void SetCdsResponse(
std::map<std::string /*cluster_name*/, Cluster> cds_response_data) {
cds_response_data_ = std::move(cds_response_data);
}
void AddEdsResponse(const DiscoveryResponse& response, int send_after_ms) {
grpc_core::MutexLock lock(&ads_mu_);
eds_responses_and_delays_.push_back(
std::make_pair(response, send_after_ms));
}
void SetLdsToUseDynamicRds() {
auto listener = default_listener_;
HttpConnectionManager http_connection_manager;
http_connection_manager.mutable_rds()->set_route_config_name(
"application_target_name");
listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
http_connection_manager);
SetLdsResponse({{"application_target_name", std::move(listener)}});
}
static Listener BuildListener(const RouteConfiguration& route_config) {
HttpConnectionManager http_connection_manager;
*(http_connection_manager.mutable_route_config()) = route_config;
Listener listener;
listener.set_name("application_target_name");
listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
http_connection_manager);
return listener;
}
void Start() {
grpc_core::MutexLock lock(&ads_mu_);
ads_done_ = false;
@ -573,6 +697,15 @@ class AdsServiceImpl : public AdsService {
// Protect the members below.
grpc_core::Mutex ads_mu_;
bool ads_done_ = false;
// LDS response data.
Listener default_listener_;
std::map<std::string /*server_name*/, Listener> lds_response_data_;
ResponseState lds_response_state_ = NOT_SENT;
// RDS response data.
RouteConfiguration default_route_config_;
std::map<std::string /*route_config_name*/, RouteConfiguration>
rds_response_data_;
ResponseState rds_response_state_ = NOT_SENT;
// CDS response data.
Cluster default_cluster_;
std::map<std::string /*cluster_name*/, Cluster> cds_response_data_;
@ -1335,13 +1468,296 @@ TEST_P(SecureNamingTest, TargetNameIsUnexpected) {
"");
}
using LdsTest = BasicTest;
// Tests that LDS client should send an ACK upon correct LDS response (with
// inlined RDS result).
TEST_P(LdsTest, Vanilla) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that LDS client should send a NACK if there is no API listener in the
// Listener in the LDS response.
TEST_P(LdsTest, NoApiListener) {
auto listener = balancers_[0]->ads_service()->default_listener();
listener.clear_api_listener();
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name", listener}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that LDS client should send a NACK if the route_specifier in the
// http_connection_manager is neither inlined route_config nor RDS.
TEST_P(LdsTest, WrongRouteSpecifier) {
auto listener = balancers_[0]->ads_service()->default_listener();
HttpConnectionManager http_connection_manager;
http_connection_manager.mutable_scoped_routes();
listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
http_connection_manager);
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name", std::move(listener)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that LDS client should send a NACK if matching domain can't be found in
// the LDS response.
TEST_P(LdsTest, NoMatchedDomain) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that LDS client should choose the virtual host with matching domain if
// multiple virtual hosts exist in the LDS response.
TEST_P(LdsTest, ChooseMatchedDomain) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
*(route_config.add_virtual_hosts()) = route_config.virtual_hosts(0);
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that LDS client should choose the last route in the virtual host if
// multiple routes exist in the LDS response.
TEST_P(LdsTest, ChooseLastRoute) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
*(route_config.mutable_virtual_hosts(0)->add_routes()) =
route_config.virtual_hosts(0).routes(0);
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that LDS client should send a NACK if route match has non-empty prefix
// in the LDS response.
TEST_P(LdsTest, RouteMatchHasNonemptyPrefix) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_match()
->set_prefix("nonempty_prefix");
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that LDS client should send a NACK if route has an action other than
// RouteAction in the LDS response.
TEST_P(LdsTest, RouteHasNoRouteAction) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)->mutable_routes(0)->mutable_redirect();
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that LDS client should send a NACK if RouteAction has a
// cluster_specifier other than cluster in the LDS response.
TEST_P(LdsTest, RouteActionHasNoCluster) {
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetLdsResponse(
{{"application_target_name",
AdsServiceImpl::BuildListener(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state(),
AdsServiceImpl::NACKED);
}
using RdsTest = BasicTest;
// Tests that RDS client should send an ACK upon correct RDS response.
TEST_P(RdsTest, Vanilla) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that RDS client should send a NACK if matching domain can't be found in
// the RDS response.
TEST_P(RdsTest, NoMatchedDomain) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that RDS client should choose the virtual host with matching domain if
// multiple virtual hosts exist in the RDS response.
TEST_P(RdsTest, ChooseMatchedDomain) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
*(route_config.add_virtual_hosts()) = route_config.virtual_hosts(0);
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that RDS client should choose the last route in the virtual host if
// multiple routes exist in the RDS response.
TEST_P(RdsTest, ChooseLastRoute) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
*(route_config.mutable_virtual_hosts(0)->add_routes()) =
route_config.virtual_hosts(0).routes(0);
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::ACKED);
}
// Tests that RDS client should send a NACK if route match has non-empty prefix
// in the RDS response.
TEST_P(RdsTest, RouteMatchHasNonemptyPrefix) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_match()
->set_prefix("nonempty_prefix");
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that RDS client should send a NACK if route has an action other than
// RouteAction in the RDS response.
TEST_P(RdsTest, RouteHasNoRouteAction) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)->mutable_routes(0)->mutable_redirect();
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::NACKED);
}
// Tests that RDS client should send a NACK if RouteAction has a
// cluster_specifier other than cluster in the RDS response.
TEST_P(RdsTest, RouteActionHasNoCluster) {
balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
RouteConfiguration route_config =
balancers_[0]->ads_service()->default_route_config();
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->mutable_cluster_header();
balancers_[0]->ads_service()->SetRdsResponse(
{{"application_target_name", std::move(route_config)}});
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
EXPECT_EQ(balancers_[0]->ads_service()->rds_response_state(),
AdsServiceImpl::NACKED);
}
using CdsTest = BasicTest;
// Tests that CDS client should send an ACK upon correct CDS response.
TEST_P(CdsTest, Vanilla) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
SendRpc();
EXPECT_EQ(balancers_[0]->ads_service()->cds_response_state(),
AdsServiceImpl::ACKED);
}
@ -1349,7 +1765,7 @@ TEST_P(CdsTest, Vanilla) {
// Tests that CDS client should send a NACK if the cluster type in CDS response
// is other than EDS.
TEST_P(CdsTest, WrongClusterType) {
auto cluster = balancers_[0]->ads_service()->GetDefaultCluster();
auto cluster = balancers_[0]->ads_service()->default_cluster();
cluster.set_type(envoy::api::v2::Cluster::STATIC);
balancers_[0]->ads_service()->SetCdsResponse(
{{"application_target_name", std::move(cluster)}});
@ -1363,7 +1779,7 @@ TEST_P(CdsTest, WrongClusterType) {
// Tests that CDS client should send a NACK if the eds_config in CDS response is
// other than ADS.
TEST_P(CdsTest, WrongEdsConfig) {
auto cluster = balancers_[0]->ads_service()->GetDefaultCluster();
auto cluster = balancers_[0]->ads_service()->default_cluster();
cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self();
balancers_[0]->ads_service()->SetCdsResponse(
{{"application_target_name", std::move(cluster)}});
@ -1377,7 +1793,7 @@ TEST_P(CdsTest, WrongEdsConfig) {
// Tests that CDS client should send a NACK if the lb_policy in CDS response is
// other than ROUND_ROBIN.
TEST_P(CdsTest, WrongLbPolicy) {
auto cluster = balancers_[0]->ads_service()->GetDefaultCluster();
auto cluster = balancers_[0]->ads_service()->default_cluster();
cluster.set_lb_policy(envoy::api::v2::Cluster::LEAST_REQUEST);
balancers_[0]->ads_service()->SetCdsResponse(
{{"application_target_name", std::move(cluster)}});
@ -1391,7 +1807,7 @@ TEST_P(CdsTest, WrongLbPolicy) {
// Tests that CDS client should send a NACK if the lrs_server in CDS response is
// other than SELF.
TEST_P(CdsTest, WrongLrsServer) {
auto cluster = balancers_[0]->ads_service()->GetDefaultCluster();
auto cluster = balancers_[0]->ads_service()->default_cluster();
cluster.mutable_lrs_server()->mutable_ads();
balancers_[0]->ads_service()->SetCdsResponse(
{{"application_target_name", std::move(cluster)}});
@ -2597,6 +3013,18 @@ INSTANTIATE_TEST_SUITE_P(XdsTest, SecureNamingTest,
TestType(true, true)),
&TestTypeName);
// LDS depends on XdsResolver.
INSTANTIATE_TEST_SUITE_P(XdsTest, LdsTest,
::testing::Values(TestType(true, false),
TestType(true, true)),
&TestTypeName);
// RDS depends on XdsResolver.
INSTANTIATE_TEST_SUITE_P(XdsTest, RdsTest,
::testing::Values(TestType(true, false),
TestType(true, true)),
&TestTypeName);
// CDS depends on XdsResolver.
INSTANTIATE_TEST_SUITE_P(XdsTest, CdsTest,
::testing::Values(TestType(true, false),

@ -54,9 +54,20 @@ proto_files=( \
"envoy/api/v2/eds.proto" \
"envoy/api/v2/endpoint/endpoint.proto" \
"envoy/api/v2/endpoint/load_report.proto" \
"envoy/api/v2/lds.proto" \
"envoy/api/v2/listener/listener.proto" \
"envoy/api/v2/rds.proto" \
"envoy/api/v2/route/route.proto" \
"envoy/api/v2/srds.proto" \
"envoy/config/listener/v2/api_listener.proto" \
"envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto" \
"envoy/config/filter/accesslog/v2/accesslog.proto" \
"envoy/service/discovery/v2/ads.proto" \
"envoy/service/load_stats/v2/lrs.proto" \
"envoy/type/http.proto" \
"envoy/type/matcher/regex.proto" \
"envoy/api/v2/listener/udp_listener_config.proto" \
"envoy/type/matcher/string.proto" \
"envoy/type/percent.proto" \
"envoy/type/range.proto" \
"gogoproto/gogo.proto" \

@ -1098,12 +1098,34 @@ 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/api/v2/lds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/lds.upb.h \
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h \
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \
src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h \
src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/rds.upb.h \
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \
src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h \
src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \
src/core/ext/upb-generated/envoy/api/v2/srds.upb.h \
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \
src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h \
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \
src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h \
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c \
src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.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/http.upb.c \
src/core/ext/upb-generated/envoy/type/http.upb.h \
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h \
src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \
src/core/ext/upb-generated/envoy/type/matcher/string.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 \

Loading…
Cancel
Save