diff --git a/BUILD b/BUILD index 9cb2aebaafb..a27da2ec4d1 100644 --- a/BUILD +++ b/BUILD @@ -2881,7 +2881,6 @@ grpc_cc_library( "src/core/ext/xds/xds_client.cc", "src/core/ext/xds/xds_client_stats.cc", "src/core/ext/xds/xds_cluster.cc", - "src/core/ext/xds/xds_cluster_specifier_plugin.cc", "src/core/ext/xds/xds_common_types.cc", "src/core/ext/xds/xds_endpoint.cc", "src/core/ext/xds/xds_http_fault_filter.cc", @@ -2906,7 +2905,6 @@ grpc_cc_library( "src/core/ext/xds/xds_client.h", "src/core/ext/xds/xds_client_stats.h", "src/core/ext/xds/xds_cluster.h", - "src/core/ext/xds/xds_cluster_specifier_plugin.h", "src/core/ext/xds/xds_common_types.h", "src/core/ext/xds/xds_endpoint.h", "src/core/ext/xds/xds_http_fault_filter.h", @@ -2995,8 +2993,6 @@ grpc_cc_library( "protobuf_timestamp_upb", "protobuf_wrappers_upb", "ref_counted_ptr", - "rls_config_upb", - "rls_config_upbdefs", "slice", "slice_refcount", "sockaddr_utils", @@ -5373,16 +5369,6 @@ grpc_upb_proto_library( deps = ["//src/proto/grpc/lookup/v1:rls_proto_descriptor"], ) -grpc_upb_proto_library( - name = "rls_config_upb", - deps = ["//src/proto/grpc/lookup/v1:rls_config_proto_descriptor"], -) - -grpc_upb_proto_reflection_library( - name = "rls_config_upbdefs", - deps = ["//src/proto/grpc/lookup/v1:rls_config_proto_descriptor"], -) - WELL_KNOWN_PROTO_TARGETS = [ "any", "duration", diff --git a/CMakeLists.txt b/CMakeLists.txt index 92adbc9eb06..ca5471ce3c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -442,9 +442,6 @@ protobuf_generate_grpc_cpp( protobuf_generate_grpc_cpp( src/proto/grpc/lookup/v1/rls.proto ) -protobuf_generate_grpc_cpp( - src/proto/grpc/lookup/v1/rls_config.proto -) protobuf_generate_grpc_cpp( src/proto/grpc/reflection/v1alpha/reflection.proto ) @@ -1656,7 +1653,6 @@ add_library(grpc src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c src/core/ext/upb-generated/udpa/annotations/migrate.upb.c src/core/ext/upb-generated/udpa/annotations/security.upb.c src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c @@ -1791,7 +1787,6 @@ add_library(grpc src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c - src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c @@ -1824,7 +1819,6 @@ add_library(grpc src/core/ext/xds/xds_client.cc src/core/ext/xds/xds_client_stats.cc src/core/ext/xds/xds_cluster.cc - src/core/ext/xds/xds_cluster_specifier_plugin.cc src/core/ext/xds/xds_common_types.cc src/core/ext/xds/xds_endpoint.cc src/core/ext/xds/xds_http_fault_filter.cc @@ -3961,7 +3955,6 @@ add_library(upb third_party/upb/upb/decode.c third_party/upb/upb/def.c third_party/upb/upb/encode.c - third_party/upb/upb/json_encode.c third_party/upb/upb/msg.c third_party/upb/upb/reflection.c third_party/upb/upb/table.c @@ -14088,7 +14081,6 @@ add_executable(rls_end2end_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.h test/core/util/test_lb_policies.cc test/cpp/end2end/rls_end2end_test.cc - test/cpp/end2end/rls_server.cc test/cpp/end2end/test_service_impl.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -16957,14 +16949,6 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(xds_end2end_test - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls_config.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls_config.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls_config.pb.h - ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lookup/v1/rls_config.grpc.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.h @@ -17122,7 +17106,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/tls.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/tls.grpc.pb.h src/cpp/server/csds/csds.cc - test/cpp/end2end/rls_server.cc test/cpp/end2end/test_service_impl.cc test/cpp/end2end/xds/xds_end2end_test.cc test/cpp/end2end/xds/xds_server.cc diff --git a/Makefile b/Makefile index 9fa48e9769a..9e8c78fb5b3 100644 --- a/Makefile +++ b/Makefile @@ -1242,7 +1242,6 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c \ - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ src/core/ext/upb-generated/udpa/annotations/security.upb.c \ src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ @@ -1377,7 +1376,6 @@ LIBGRPC_SRC = \ src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c \ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c \ - src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c \ @@ -1410,7 +1408,6 @@ LIBGRPC_SRC = \ src/core/ext/xds/xds_client.cc \ src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_cluster.cc \ - src/core/ext/xds/xds_cluster_specifier_plugin.cc \ src/core/ext/xds/xds_common_types.cc \ src/core/ext/xds/xds_endpoint.cc \ src/core/ext/xds/xds_http_fault_filter.cc \ @@ -2529,7 +2526,6 @@ LIBUPB_SRC = \ third_party/upb/upb/decode.c \ third_party/upb/upb/def.c \ third_party/upb/upb/encode.c \ - third_party/upb/upb/json_encode.c \ third_party/upb/upb/msg.c \ third_party/upb/upb/reflection.c \ third_party/upb/upb/table.c \ @@ -2947,7 +2943,6 @@ src/core/ext/upb-generated/opencensus/proto/trace/v1/trace_config.upb.c: $(OPENS src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c: $(OPENSSL_DEP) src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c: $(OPENSSL_DEP) src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c: $(OPENSSL_DEP) -src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c: $(OPENSSL_DEP) src/core/ext/upb-generated/udpa/annotations/migrate.upb.c: $(OPENSSL_DEP) src/core/ext/upb-generated/udpa/annotations/security.upb.c: $(OPENSSL_DEP) src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c: $(OPENSSL_DEP) @@ -3079,7 +3074,6 @@ src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c: $(OPENSSL_DE src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c: $(OPENSSL_DEP) src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c: $(OPENSSL_DEP) src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c: $(OPENSSL_DEP) -src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c: $(OPENSSL_DEP) src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c: $(OPENSSL_DEP) src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c: $(OPENSSL_DEP) src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c: $(OPENSSL_DEP) @@ -3112,7 +3106,6 @@ src/core/ext/xds/xds_channel_stack_modifier.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_client.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_client_stats.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_cluster.cc: $(OPENSSL_DEP) -src/core/ext/xds/xds_cluster_specifier_plugin.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_common_types.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_endpoint.cc: $(OPENSSL_DEP) src/core/ext/xds/xds_http_fault_filter.cc: $(OPENSSL_DEP) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index d62ebe376eb..b7992335411 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -513,7 +513,6 @@ libs: - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h - - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h - src/core/ext/upb-generated/udpa/annotations/migrate.upb.h - src/core/ext/upb-generated/udpa/annotations/security.upb.h - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h @@ -648,7 +647,6 @@ libs: - src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h - src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h - src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h - - src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h - src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h - src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h - src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h @@ -684,7 +682,6 @@ libs: - src/core/ext/xds/xds_client.h - src/core/ext/xds/xds_client_stats.h - src/core/ext/xds/xds_cluster.h - - src/core/ext/xds/xds_cluster_specifier_plugin.h - src/core/ext/xds/xds_common_types.h - src/core/ext/xds/xds_endpoint.h - src/core/ext/xds/xds_http_fault_filter.h @@ -1188,7 +1185,6 @@ libs: - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c - - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c - src/core/ext/upb-generated/udpa/annotations/migrate.upb.c - src/core/ext/upb-generated/udpa/annotations/security.upb.c - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c @@ -1323,7 +1319,6 @@ libs: - src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c - src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c - src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c - - src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c - src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c - src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c - src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c @@ -1356,7 +1351,6 @@ libs: - src/core/ext/xds/xds_client.cc - src/core/ext/xds/xds_client_stats.cc - src/core/ext/xds/xds_cluster.cc - - src/core/ext/xds/xds_cluster_specifier_plugin.cc - src/core/ext/xds/xds_common_types.cc - src/core/ext/xds/xds_endpoint.cc - src/core/ext/xds/xds_http_fault_filter.cc @@ -7126,7 +7120,6 @@ targets: headers: - test/core/util/test_lb_policies.h - test/cpp/end2end/counted_service.h - - test/cpp/end2end/rls_server.h - test/cpp/end2end/test_service_impl.h src: - src/proto/grpc/lookup/v1/rls.proto @@ -7136,7 +7129,6 @@ targets: - src/proto/grpc/testing/simple_messages.proto - test/core/util/test_lb_policies.cc - test/cpp/end2end/rls_end2end_test.cc - - test/cpp/end2end/rls_server.cc - test/cpp/end2end/test_service_impl.cc deps: - grpc++_test_config @@ -8352,13 +8344,10 @@ targets: headers: - src/cpp/server/csds/csds.h - test/cpp/end2end/counted_service.h - - test/cpp/end2end/rls_server.h - test/cpp/end2end/test_service_impl.h - test/cpp/end2end/xds/xds_server.h - test/cpp/util/tls_test_utils.h src: - - src/proto/grpc/lookup/v1/rls.proto - - src/proto/grpc/lookup/v1/rls_config.proto - src/proto/grpc/testing/duplicate/echo_duplicate.proto - src/proto/grpc/testing/echo.proto - src/proto/grpc/testing/echo_messages.proto @@ -8399,7 +8388,6 @@ targets: - src/proto/grpc/testing/xds/v3/string.proto - src/proto/grpc/testing/xds/v3/tls.proto - src/cpp/server/csds/csds.cc - - test/cpp/end2end/rls_server.cc - test/cpp/end2end/test_service_impl.cc - test/cpp/end2end/xds/xds_end2end_test.cc - test/cpp/end2end/xds/xds_server.cc diff --git a/config.m4 b/config.m4 index 4a40af5382c..aa1a9f3aae4 100644 --- a/config.m4 +++ b/config.m4 @@ -260,7 +260,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c \ - src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ src/core/ext/upb-generated/udpa/annotations/security.upb.c \ src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ @@ -395,7 +394,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c \ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c \ - src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c \ @@ -428,7 +426,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/xds/xds_client.cc \ src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_cluster.cc \ - src/core/ext/xds/xds_cluster_specifier_plugin.cc \ src/core/ext/xds/xds_common_types.cc \ src/core/ext/xds/xds_endpoint.cc \ src/core/ext/xds/xds_http_fault_filter.cc \ @@ -1153,7 +1150,6 @@ if test "$PHP_GRPC" != "no"; then third_party/upb/upb/decode_fast.c \ third_party/upb/upb/def.c \ third_party/upb/upb/encode.c \ - third_party/upb/upb/json_encode.c \ third_party/upb/upb/msg.c \ third_party/upb/upb/reflection.c \ third_party/upb/upb/table.c \ @@ -1284,7 +1280,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/google/protobuf) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/google/rpc) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/opencensus/proto/trace/v1) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/udpa/annotations) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/validate) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upbdefs-generated/xds/annotations/v3) diff --git a/config.w32 b/config.w32 index 990db857c7f..dfc72f7db81 100644 --- a/config.w32 +++ b/config.w32 @@ -226,7 +226,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1\\health.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1\\load_balancer.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lookup\\v1\\rls.upb.c " + - "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lookup\\v1\\rls_config.upb.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\migrate.upb.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\security.upb.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\sensitive.upb.c " + @@ -361,7 +360,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upbdefs-generated\\google\\protobuf\\wrappers.upbdefs.c " + "src\\core\\ext\\upbdefs-generated\\google\\rpc\\status.upbdefs.c " + "src\\core\\ext\\upbdefs-generated\\opencensus\\proto\\trace\\v1\\trace_config.upbdefs.c " + - "src\\core\\ext\\upbdefs-generated\\src\\proto\\grpc\\lookup\\v1\\rls_config.upbdefs.c " + "src\\core\\ext\\upbdefs-generated\\udpa\\annotations\\migrate.upbdefs.c " + "src\\core\\ext\\upbdefs-generated\\udpa\\annotations\\security.upbdefs.c " + "src\\core\\ext\\upbdefs-generated\\udpa\\annotations\\sensitive.upbdefs.c " + @@ -394,7 +392,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\xds\\xds_client.cc " + "src\\core\\ext\\xds\\xds_client_stats.cc " + "src\\core\\ext\\xds\\xds_cluster.cc " + - "src\\core\\ext\\xds\\xds_cluster_specifier_plugin.cc " + "src\\core\\ext\\xds\\xds_common_types.cc " + "src\\core\\ext\\xds\\xds_endpoint.cc " + "src\\core\\ext\\xds\\xds_http_fault_filter.cc " + @@ -1119,7 +1116,6 @@ if (PHP_GRPC != "no") { "third_party\\upb\\upb\\decode_fast.c " + "third_party\\upb\\upb\\def.c " + "third_party\\upb\\upb\\encode.c " + - "third_party\\upb\\upb\\json_encode.c " + "third_party\\upb\\upb\\msg.c " + "third_party\\upb\\upb\\reflection.c " + "third_party\\upb\\upb\\table.c " + @@ -1390,11 +1386,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\opencensus\\proto"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\opencensus\\proto\\trace"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\opencensus\\proto\\trace\\v1"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\src"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\src\\proto"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\src\\proto\\grpc"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\src\\proto\\grpc\\lookup"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\src\\proto\\grpc\\lookup\\v1"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\udpa"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\udpa\\annotations"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upbdefs-generated\\validate"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 224de8efaeb..083a2998934 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -453,7 +453,6 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', 'src/core/ext/upb-generated/udpa/annotations/security.upb.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', @@ -588,7 +587,6 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h', @@ -624,7 +622,6 @@ Pod::Spec.new do |s| 'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_cluster.h', - 'src/core/ext/xds/xds_cluster_specifier_plugin.h', 'src/core/ext/xds/xds_common_types.h', 'src/core/ext/xds/xds_endpoint.h', 'src/core/ext/xds/xds_http_fault_filter.h', @@ -1027,7 +1024,6 @@ Pod::Spec.new do |s| 'third_party/upb/upb/def.h', 'third_party/upb/upb/def.hpp', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/json_encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/msg_internal.h', 'third_party/upb/upb/port_def.inc', @@ -1262,7 +1258,6 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', 'src/core/ext/upb-generated/udpa/annotations/security.upb.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', @@ -1397,7 +1392,6 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h', @@ -1433,7 +1427,6 @@ Pod::Spec.new do |s| 'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_cluster.h', - 'src/core/ext/xds/xds_cluster_specifier_plugin.h', 'src/core/ext/xds/xds_common_types.h', 'src/core/ext/xds/xds_endpoint.h', 'src/core/ext/xds/xds_http_fault_filter.h', @@ -1786,7 +1779,6 @@ Pod::Spec.new do |s| 'third_party/upb/upb/def.h', 'third_party/upb/upb/def.hpp', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/json_encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/msg_internal.h', 'third_party/upb/upb/port_def.inc', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 0a860019718..1b106b25d7e 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -612,8 +612,6 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', 'src/core/ext/upb-generated/udpa/annotations/security.upb.c', @@ -882,8 +880,6 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c', @@ -951,8 +947,6 @@ Pod::Spec.new do |s| 'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_cluster.cc', 'src/core/ext/xds/xds_cluster.h', - 'src/core/ext/xds/xds_cluster_specifier_plugin.cc', - 'src/core/ext/xds/xds_cluster_specifier_plugin.h', 'src/core/ext/xds/xds_common_types.cc', 'src/core/ext/xds/xds_common_types.h', 'src/core/ext/xds/xds_endpoint.cc', @@ -1644,8 +1638,6 @@ Pod::Spec.new do |s| 'third_party/upb/upb/def.hpp', 'third_party/upb/upb/encode.c', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/json_encode.c', - 'third_party/upb/upb/json_encode.h', 'third_party/upb/upb/msg.c', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/msg_internal.h', @@ -1864,7 +1856,6 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', 'src/core/ext/upb-generated/udpa/annotations/security.upb.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', @@ -1999,7 +1990,6 @@ Pod::Spec.new do |s| 'src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h', 'src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h', @@ -2035,7 +2025,6 @@ Pod::Spec.new do |s| 'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_cluster.h', - 'src/core/ext/xds/xds_cluster_specifier_plugin.h', 'src/core/ext/xds/xds_common_types.h', 'src/core/ext/xds/xds_endpoint.h', 'src/core/ext/xds/xds_http_fault_filter.h', @@ -2378,7 +2367,6 @@ Pod::Spec.new do |s| 'third_party/upb/upb/def.h', 'third_party/upb/upb/def.hpp', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/json_encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/msg_internal.h', 'third_party/upb/upb/port_def.inc', diff --git a/grpc.gemspec b/grpc.gemspec index 2465cae2653..8a56c3841a0 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -531,8 +531,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h ) - s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c ) - s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h ) s.files += %w( src/core/ext/upb-generated/udpa/annotations/migrate.upb.c ) s.files += %w( src/core/ext/upb-generated/udpa/annotations/migrate.upb.h ) s.files += %w( src/core/ext/upb-generated/udpa/annotations/security.upb.c ) @@ -801,8 +799,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h ) s.files += %w( src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c ) s.files += %w( src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h ) - s.files += %w( src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c ) - s.files += %w( src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h ) s.files += %w( src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c ) s.files += %w( src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h ) s.files += %w( src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c ) @@ -870,8 +866,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/xds/xds_client_stats.h ) s.files += %w( src/core/ext/xds/xds_cluster.cc ) s.files += %w( src/core/ext/xds/xds_cluster.h ) - s.files += %w( src/core/ext/xds/xds_cluster_specifier_plugin.cc ) - s.files += %w( src/core/ext/xds/xds_cluster_specifier_plugin.h ) s.files += %w( src/core/ext/xds/xds_common_types.cc ) s.files += %w( src/core/ext/xds/xds_common_types.h ) s.files += %w( src/core/ext/xds/xds_endpoint.cc ) @@ -2442,8 +2436,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/upb/upb/def.hpp ) s.files += %w( third_party/upb/upb/encode.c ) s.files += %w( third_party/upb/upb/encode.h ) - s.files += %w( third_party/upb/upb/json_encode.c ) - s.files += %w( third_party/upb/upb/json_encode.h ) s.files += %w( third_party/upb/upb/msg.c ) s.files += %w( third_party/upb/upb/msg.h ) s.files += %w( third_party/upb/upb/msg_internal.h ) diff --git a/grpc.gyp b/grpc.gyp index 3a796ce45b8..ca719c20de5 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -590,7 +590,6 @@ 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', 'src/core/ext/upb-generated/udpa/annotations/security.upb.c', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', @@ -725,7 +724,6 @@ 'src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c', 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c', @@ -758,7 +756,6 @@ 'src/core/ext/xds/xds_client.cc', 'src/core/ext/xds/xds_client_stats.cc', 'src/core/ext/xds/xds_cluster.cc', - 'src/core/ext/xds/xds_cluster_specifier_plugin.cc', 'src/core/ext/xds/xds_common_types.cc', 'src/core/ext/xds/xds_endpoint.cc', 'src/core/ext/xds/xds_http_fault_filter.cc', @@ -2039,7 +2036,6 @@ 'third_party/upb/upb/decode.c', 'third_party/upb/upb/def.c', 'third_party/upb/upb/encode.c', - 'third_party/upb/upb/json_encode.c', 'third_party/upb/upb/msg.c', 'third_party/upb/upb/reflection.c', 'third_party/upb/upb/table.c', diff --git a/package.xml b/package.xml index 32f6916f712..f7c2e8ff347 100644 --- a/package.xml +++ b/package.xml @@ -511,8 +511,6 @@ - - @@ -781,8 +779,6 @@ - - @@ -850,8 +846,6 @@ - - @@ -2358,8 +2352,6 @@ - - diff --git a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc index e7bd80895f9..068af6102a1 100644 --- a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +++ b/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc @@ -83,7 +83,7 @@ TraceFlag grpc_lb_rls_trace(false, "rls_lb"); namespace { -const char* kRls = "rls_experimental"; +const char* kRls = "rls"; const char kGrpc[] = "grpc"; const char* kRlsRequestPath = "/grpc.lookup.v1.RouteLookupService/RouteLookup"; const char* kFakeTargetFieldValue = "fake_target_field_value"; @@ -2530,9 +2530,18 @@ class RlsLbFactory : public LoadBalancingPolicyFactory { } }; +bool RlsEnabled() { + char* value = gpr_getenv("GRPC_EXPERIMENTAL_ENABLE_RLS_LB_POLICY"); + bool parsed_value; + bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value); + gpr_free(value); + return parse_succeeded && parsed_value; +} + } // namespace void RlsLbPluginInit() { + if (!RlsEnabled()) return; LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory( absl::make_unique()); } diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc index 5c3e0ef1c34..b30debc2652 100644 --- a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc @@ -330,9 +330,6 @@ class XdsResolver : public Resolver { std::string route_config_name_; RouteConfigWatcher* route_config_watcher_ = nullptr; XdsRouteConfigResource::VirtualHost current_virtual_host_; - std::map - cluster_specifier_plugin_map_; ClusterState::ClusterStateMap cluster_state_map_; }; @@ -419,23 +416,13 @@ XdsResolver::XdsConfigSelector::XdsConfigSelector( resolver_->current_listener_.http_connection_manager .http_max_stream_duration; } - if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction::kClusterIndex) { + if (route_action->weighted_clusters.empty()) { *error = CreateMethodConfig(route_entry.route, nullptr, &route_entry.method_config); - MaybeAddCluster(absl::StrCat( - "cluster:", - absl::get< - XdsRouteConfigResource::Route::RouteAction::kClusterIndex>( - route_action->action))); - } else if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction:: - kWeightedClustersIndex) { - auto& action_weighted_clusters = absl::get< - XdsRouteConfigResource::Route::RouteAction::kWeightedClustersIndex>( - route_action->action); + MaybeAddCluster(route_action->cluster_name); + } else { uint32_t end = 0; - for (const auto& weighted_cluster : action_weighted_clusters) { + for (const auto& weighted_cluster : route_action->weighted_clusters) { Route::ClusterWeightState cluster_weight_state; *error = CreateMethodConfig(route_entry.route, &weighted_cluster, &cluster_weight_state.method_config); @@ -445,18 +432,8 @@ XdsResolver::XdsConfigSelector::XdsConfigSelector( cluster_weight_state.cluster = weighted_cluster.name; route_entry.weighted_cluster_state.push_back( std::move(cluster_weight_state)); - MaybeAddCluster(absl::StrCat("cluster:", weighted_cluster.name)); + MaybeAddCluster(weighted_cluster.name); } - } else if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction:: - kClusterSpecifierPluginIndex) { - // cluster_specifier_plugin case: - *error = CreateMethodConfig(route_entry.route, nullptr, - &route_entry.method_config); - MaybeAddCluster(absl::StrCat( - "cluster_specifier_plugin:", - absl::get(route_action->action))); } } } @@ -635,18 +612,12 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig( GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE); return call_config; } - std::string cluster_name; + absl::string_view cluster_name; RefCountedPtr method_config; - if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction::kClusterIndex) { - cluster_name = absl::StrCat( - "cluster:", - absl::get( - route_action->action)); + if (route_action->weighted_clusters.empty()) { + cluster_name = route_action->cluster_name; method_config = entry.method_config; - } else if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction:: - kWeightedClustersIndex) { + } else { const uint32_t key = rand() % entry.weighted_cluster_state[entry.weighted_cluster_state.size() - 1] @@ -669,17 +640,8 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig( } if (index == 0) index = start_index; GPR_ASSERT(entry.weighted_cluster_state[index].range_end > key); - cluster_name = - absl::StrCat("cluster:", entry.weighted_cluster_state[index].cluster); + cluster_name = entry.weighted_cluster_state[index].cluster; method_config = entry.weighted_cluster_state[index].method_config; - } else if (route_action->action.index() == - XdsRouteConfigResource::Route::RouteAction:: - kClusterSpecifierPluginIndex) { - cluster_name = absl::StrCat( - "cluster_specifier_plugin:", - absl::get(route_action->action)); - method_config = entry.method_config; } auto it = clusters_.find(cluster_name); GPR_ASSERT(it != clusters_.end()); @@ -901,8 +863,6 @@ void XdsResolver::OnRouteConfigUpdate(XdsRouteConfigResource rds_update) { } // Save the virtual host in the resolver. current_virtual_host_ = std::move(rds_update.virtual_hosts[*vhost_index]); - cluster_specifier_plugin_map_ = - std::move(rds_update.cluster_specifier_plugin_map); // Send a new result to the channel. GenerateResult(); } @@ -940,26 +900,15 @@ absl::StatusOr> XdsResolver::CreateServiceConfig() { std::vector clusters; for (const auto& cluster : cluster_state_map_) { - absl::string_view child_name = cluster.first; - if (absl::ConsumePrefix(&child_name, "cluster_specifier_plugin:")) { - clusters.push_back(absl::StrFormat( - " \"%s\":{\n" - " \"childPolicy\": %s\n" - " }", - cluster.first, - cluster_specifier_plugin_map_[std::string(child_name)])); - } else { - absl::ConsumePrefix(&child_name, "cluster:"); - clusters.push_back( - absl::StrFormat(" \"%s\":{\n" - " \"childPolicy\":[ {\n" - " \"cds_experimental\":{\n" - " \"cluster\": \"%s\"\n" - " }\n" - " } ]\n" - " }", - cluster.first, child_name)); - } + clusters.push_back( + absl::StrFormat(" \"%s\":{\n" + " \"childPolicy\":[ {\n" + " \"cds_experimental\":{\n" + " \"cluster\": \"%s\"\n" + " }\n" + " } ]\n" + " }", + cluster.first, cluster.first)); } std::vector config_parts; config_parts.push_back( diff --git a/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c b/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c deleted file mode 100644 index aa69eaf7f41..00000000000 --- a/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c +++ /dev/null @@ -1,172 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * src/proto/grpc/lookup/v1/rls_config.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include -#include "upb/msg_internal.h" -#include "src/proto/grpc/lookup/v1/rls_config.upb.h" -#include "google/protobuf/duration.upb.h" - -#include "upb/port_def.inc" - -static const upb_MiniTable_Field grpc_lookup_v1_NameMatcher__fields[3] = { - {1, UPB_SIZE(4, 8), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {3, UPB_SIZE(0, 0), 0, 0, 8, kUpb_FieldMode_Scalar | (upb_FieldRep_1Byte << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_NameMatcher_msginit = { - NULL, - &grpc_lookup_v1_NameMatcher__fields[0], - UPB_SIZE(16, 32), 3, upb_ExtMode_NonExtendable, 3, 255, 0, -}; - -static const upb_MiniTable_Sub grpc_lookup_v1_GrpcKeyBuilder_submsgs[4] = { - {.submsg = &grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit}, - {.submsg = &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit}, - {.submsg = &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit}, - {.submsg = &grpc_lookup_v1_NameMatcher_msginit}, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder__fields[4] = { - {1, UPB_SIZE(8, 16), 0, 2, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {2, UPB_SIZE(12, 24), 0, 3, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {3, UPB_SIZE(4, 8), 1, 1, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {4, UPB_SIZE(16, 32), 0, 0, 11, kUpb_FieldMode_Map | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_msginit = { - &grpc_lookup_v1_GrpcKeyBuilder_submsgs[0], - &grpc_lookup_v1_GrpcKeyBuilder__fields[0], - UPB_SIZE(24, 40), 4, upb_ExtMode_NonExtendable, 4, 255, 0, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_Name__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_Name_msginit = { - NULL, - &grpc_lookup_v1_GrpcKeyBuilder_Name__fields[0], - UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys__fields[3] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 32), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit = { - NULL, - &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys__fields[0], - UPB_SIZE(24, 48), 3, upb_ExtMode_NonExtendable, 3, 255, 0, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit = { - NULL, - &grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry__fields[0], - UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, -}; - -static const upb_MiniTable_Sub grpc_lookup_v1_HttpKeyBuilder_submsgs[2] = { - {.submsg = &grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit}, - {.submsg = &grpc_lookup_v1_NameMatcher_msginit}, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_HttpKeyBuilder__fields[5] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {2, UPB_SIZE(4, 8), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {3, UPB_SIZE(8, 16), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {4, UPB_SIZE(12, 24), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {5, UPB_SIZE(16, 32), 0, 0, 11, kUpb_FieldMode_Map | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_msginit = { - &grpc_lookup_v1_HttpKeyBuilder_submsgs[0], - &grpc_lookup_v1_HttpKeyBuilder__fields[0], - UPB_SIZE(24, 40), 5, upb_ExtMode_NonExtendable, 5, 255, 0, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry__fields[2] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit = { - NULL, - &grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry__fields[0], - UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, -}; - -static const upb_MiniTable_Sub grpc_lookup_v1_RouteLookupConfig_submsgs[3] = { - {.submsg = &google_protobuf_Duration_msginit}, - {.submsg = &grpc_lookup_v1_GrpcKeyBuilder_msginit}, - {.submsg = &grpc_lookup_v1_HttpKeyBuilder_msginit}, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_RouteLookupConfig__fields[9] = { - {1, UPB_SIZE(44, 72), 0, 2, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {2, UPB_SIZE(48, 80), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {3, UPB_SIZE(16, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, - {4, UPB_SIZE(32, 48), 1, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {5, UPB_SIZE(36, 56), 2, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {6, UPB_SIZE(40, 64), 3, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {7, UPB_SIZE(8, 8), 0, 0, 3, kUpb_FieldMode_Scalar | (upb_FieldRep_8Byte << upb_FieldRep_Shift)}, - {8, UPB_SIZE(52, 88), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, - {9, UPB_SIZE(24, 32), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_RouteLookupConfig_msginit = { - &grpc_lookup_v1_RouteLookupConfig_submsgs[0], - &grpc_lookup_v1_RouteLookupConfig__fields[0], - UPB_SIZE(56, 96), 9, upb_ExtMode_NonExtendable, 9, 255, 0, -}; - -static const upb_MiniTable_Sub grpc_lookup_v1_RouteLookupClusterSpecifier_submsgs[1] = { - {.submsg = &grpc_lookup_v1_RouteLookupConfig_msginit}, -}; - -static const upb_MiniTable_Field grpc_lookup_v1_RouteLookupClusterSpecifier__fields[1] = { - {1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, -}; - -const upb_MiniTable grpc_lookup_v1_RouteLookupClusterSpecifier_msginit = { - &grpc_lookup_v1_RouteLookupClusterSpecifier_submsgs[0], - &grpc_lookup_v1_RouteLookupClusterSpecifier__fields[0], - UPB_SIZE(8, 16), 1, upb_ExtMode_NonExtendable, 1, 255, 0, -}; - -static const upb_MiniTable *messages_layout[9] = { - &grpc_lookup_v1_NameMatcher_msginit, - &grpc_lookup_v1_GrpcKeyBuilder_msginit, - &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, - &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, - &grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit, - &grpc_lookup_v1_HttpKeyBuilder_msginit, - &grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit, - &grpc_lookup_v1_RouteLookupConfig_msginit, - &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, -}; - -const upb_MiniTable_File src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout = { - messages_layout, - NULL, - NULL, - 9, - 0, - 0, -}; - -#include "upb/port_undef.inc" - diff --git a/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h b/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h deleted file mode 100644 index fefd848cd8f..00000000000 --- a/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h +++ /dev/null @@ -1,623 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * src/proto/grpc/lookup/v1/rls_config.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ -#define SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ - -#include "upb/msg_internal.h" -#include "upb/decode.h" -#include "upb/decode_fast.h" -#include "upb/encode.h" - -#include "upb/port_def.inc" - -#ifdef __cplusplus -extern "C" { -#endif - -struct grpc_lookup_v1_NameMatcher; -struct grpc_lookup_v1_GrpcKeyBuilder; -struct grpc_lookup_v1_GrpcKeyBuilder_Name; -struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys; -struct grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry; -struct grpc_lookup_v1_HttpKeyBuilder; -struct grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry; -struct grpc_lookup_v1_RouteLookupConfig; -struct grpc_lookup_v1_RouteLookupClusterSpecifier; -typedef struct grpc_lookup_v1_NameMatcher grpc_lookup_v1_NameMatcher; -typedef struct grpc_lookup_v1_GrpcKeyBuilder grpc_lookup_v1_GrpcKeyBuilder; -typedef struct grpc_lookup_v1_GrpcKeyBuilder_Name grpc_lookup_v1_GrpcKeyBuilder_Name; -typedef struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys; -typedef struct grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry; -typedef struct grpc_lookup_v1_HttpKeyBuilder grpc_lookup_v1_HttpKeyBuilder; -typedef struct grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry; -typedef struct grpc_lookup_v1_RouteLookupConfig grpc_lookup_v1_RouteLookupConfig; -typedef struct grpc_lookup_v1_RouteLookupClusterSpecifier grpc_lookup_v1_RouteLookupClusterSpecifier; -extern const upb_MiniTable grpc_lookup_v1_NameMatcher_msginit; -extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_msginit; -extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_Name_msginit; -extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit; -extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit; -extern const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_msginit; -extern const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit; -extern const upb_MiniTable grpc_lookup_v1_RouteLookupConfig_msginit; -extern const upb_MiniTable grpc_lookup_v1_RouteLookupClusterSpecifier_msginit; -struct google_protobuf_Duration; -extern const upb_MiniTable google_protobuf_Duration_msginit; - - - -/* grpc.lookup.v1.NameMatcher */ - -UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_new(upb_Arena* arena) { - return (grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_NameMatcher* ret = grpc_lookup_v1_NameMatcher_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_NameMatcher_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_NameMatcher* ret = grpc_lookup_v1_NameMatcher_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_NameMatcher_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_NameMatcher_serialize(const grpc_lookup_v1_NameMatcher* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_NameMatcher_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_NameMatcher_serialize_ex(const grpc_lookup_v1_NameMatcher* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_NameMatcher_msginit, options, arena, len); -} -UPB_INLINE upb_StringView grpc_lookup_v1_NameMatcher_key(const grpc_lookup_v1_NameMatcher* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); -} -UPB_INLINE upb_StringView const* grpc_lookup_v1_NameMatcher_names(const grpc_lookup_v1_NameMatcher *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE bool grpc_lookup_v1_NameMatcher_required_match(const grpc_lookup_v1_NameMatcher* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); -} - -UPB_INLINE void grpc_lookup_v1_NameMatcher_set_key(grpc_lookup_v1_NameMatcher *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; -} -UPB_INLINE upb_StringView* grpc_lookup_v1_NameMatcher_mutable_names(grpc_lookup_v1_NameMatcher *msg, size_t *len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); -} -UPB_INLINE upb_StringView* grpc_lookup_v1_NameMatcher_resize_names(grpc_lookup_v1_NameMatcher *msg, size_t len, upb_Arena *arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena); -} -UPB_INLINE bool grpc_lookup_v1_NameMatcher_add_names(grpc_lookup_v1_NameMatcher *msg, upb_StringView val, upb_Arena *arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val, - arena); -} -UPB_INLINE void grpc_lookup_v1_NameMatcher_set_required_match(grpc_lookup_v1_NameMatcher *msg, bool value) { - *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; -} - -/* grpc.lookup.v1.GrpcKeyBuilder */ - -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_new(upb_Arena* arena) { - return (grpc_lookup_v1_GrpcKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder* ret = grpc_lookup_v1_GrpcKeyBuilder_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder* ret = grpc_lookup_v1_GrpcKeyBuilder_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_serialize(const grpc_lookup_v1_GrpcKeyBuilder* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_msginit, options, arena, len); -} -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_names(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } -UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_Name* const* grpc_lookup_v1_GrpcKeyBuilder_names(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_GrpcKeyBuilder_Name* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_headers(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } -UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_GrpcKeyBuilder_headers(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_extra_keys(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_hasbit(msg, 1); } -UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_extra_keys(const grpc_lookup_v1_GrpcKeyBuilder* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*); -} -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_constant_keys(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } -UPB_INLINE size_t grpc_lookup_v1_GrpcKeyBuilder_constant_keys_size(const grpc_lookup_v1_GrpcKeyBuilder *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_get(const grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key, upb_StringView *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, 0); } -UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_GrpcKeyBuilder_constant_keys_next(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t* iter) { return (const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } - -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name** grpc_lookup_v1_GrpcKeyBuilder_mutable_names(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { - return (grpc_lookup_v1_GrpcKeyBuilder_Name**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name** grpc_lookup_v1_GrpcKeyBuilder_resize_names(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_GrpcKeyBuilder_Name**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_add_names(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { - struct grpc_lookup_v1_GrpcKeyBuilder_Name* sub = (struct grpc_lookup_v1_GrpcKeyBuilder_Name*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_GrpcKeyBuilder_mutable_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { - return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_GrpcKeyBuilder_resize_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_GrpcKeyBuilder_add_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { - struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_set_extra_keys(grpc_lookup_v1_GrpcKeyBuilder *msg, grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* value) { - _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*) = value; -} -UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_mutable_extra_keys(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { - struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* sub = (struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)grpc_lookup_v1_GrpcKeyBuilder_extra_keys(msg); - if (sub == NULL) { - sub = (struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, arena); - if (!sub) return NULL; - grpc_lookup_v1_GrpcKeyBuilder_set_extra_keys(msg, sub); - } - return sub; -} -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_constant_keys_clear(grpc_lookup_v1_GrpcKeyBuilder *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); } -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_set(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key, upb_StringView val, upb_Arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, 0, a); } -UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_delete(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); } -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_GrpcKeyBuilder_constant_keys_nextmutable(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t* iter) { return (grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } - -/* grpc.lookup.v1.GrpcKeyBuilder.Name */ - -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_new(upb_Arena* arena) { - return (grpc_lookup_v1_GrpcKeyBuilder_Name*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder_Name* ret = grpc_lookup_v1_GrpcKeyBuilder_Name_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder_Name* ret = grpc_lookup_v1_GrpcKeyBuilder_Name_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_Name_serialize(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_Name_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, options, arena, len); -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_Name_service(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_Name_method(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView); -} - -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_Name_set_service(grpc_lookup_v1_GrpcKeyBuilder_Name *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; -} -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_Name_set_method(grpc_lookup_v1_GrpcKeyBuilder_Name *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value; -} - -/* grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys */ - -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(upb_Arena* arena) { - return (grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* ret = grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* ret = grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_serialize(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, options, arena, len); -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_host(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_service(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView); -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_method(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView); -} - -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_host(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; -} -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_service(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value; -} -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_method(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value; -} - -/* grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry */ - -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_key(const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg) { - upb_StringView ret; - _upb_msg_map_key(msg, &ret, 0); - return ret; -} -UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_value(const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg) { - upb_StringView ret; - _upb_msg_map_value(msg, &ret, 0); - return ret; -} - -UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_set_value(grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg, upb_StringView value) { - _upb_msg_map_set_value(msg, &value, 0); -} - -/* grpc.lookup.v1.HttpKeyBuilder */ - -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_new(upb_Arena* arena) { - return (grpc_lookup_v1_HttpKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_HttpKeyBuilder_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_HttpKeyBuilder* ret = grpc_lookup_v1_HttpKeyBuilder_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_HttpKeyBuilder_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_HttpKeyBuilder* ret = grpc_lookup_v1_HttpKeyBuilder_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_HttpKeyBuilder_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_HttpKeyBuilder_serialize(const grpc_lookup_v1_HttpKeyBuilder* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_HttpKeyBuilder_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_HttpKeyBuilder_serialize_ex(const grpc_lookup_v1_HttpKeyBuilder* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_HttpKeyBuilder_msginit, options, arena, len); -} -UPB_INLINE upb_StringView const* grpc_lookup_v1_HttpKeyBuilder_host_patterns(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } -UPB_INLINE upb_StringView const* grpc_lookup_v1_HttpKeyBuilder_path_patterns(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_query_parameters(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } -UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_HttpKeyBuilder_query_parameters(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_headers(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } -UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_HttpKeyBuilder_headers(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_constant_keys(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } -UPB_INLINE size_t grpc_lookup_v1_HttpKeyBuilder_constant_keys_size(const grpc_lookup_v1_HttpKeyBuilder *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_get(const grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key, upb_StringView *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, 0); } -UPB_INLINE const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_HttpKeyBuilder_constant_keys_next(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t* iter) { return (const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } - -UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_mutable_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); -} -UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_resize_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena); -} -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_add_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView val, upb_Arena *arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val, - arena); -} -UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_mutable_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); -} -UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_resize_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(3, 4), arena); -} -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_add_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView val, upb_Arena *arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(3, 4), &val, - arena); -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_mutable_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { - return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_resize_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_HttpKeyBuilder_add_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, upb_Arena *arena) { - struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_mutable_headers(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { - return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); -} -UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_resize_headers(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_HttpKeyBuilder_add_headers(grpc_lookup_v1_HttpKeyBuilder *msg, upb_Arena *arena) { - struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE void grpc_lookup_v1_HttpKeyBuilder_constant_keys_clear(grpc_lookup_v1_HttpKeyBuilder *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_set(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key, upb_StringView val, upb_Arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, 0, a); } -UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_delete(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); } -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_HttpKeyBuilder_constant_keys_nextmutable(grpc_lookup_v1_HttpKeyBuilder *msg, size_t* iter) { return (grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } - -/* grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry */ - -UPB_INLINE upb_StringView grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_key(const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg) { - upb_StringView ret; - _upb_msg_map_key(msg, &ret, 0); - return ret; -} -UPB_INLINE upb_StringView grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_value(const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg) { - upb_StringView ret; - _upb_msg_map_value(msg, &ret, 0); - return ret; -} - -UPB_INLINE void grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_set_value(grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg, upb_StringView value) { - _upb_msg_map_set_value(msg, &value, 0); -} - -/* grpc.lookup.v1.RouteLookupConfig */ - -UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_new(upb_Arena* arena) { - return (grpc_lookup_v1_RouteLookupConfig*)_upb_Message_New(&grpc_lookup_v1_RouteLookupConfig_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_RouteLookupConfig* ret = grpc_lookup_v1_RouteLookupConfig_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_RouteLookupConfig* ret = grpc_lookup_v1_RouteLookupConfig_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupConfig_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_RouteLookupConfig_serialize(const grpc_lookup_v1_RouteLookupConfig* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_RouteLookupConfig_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_RouteLookupConfig_serialize_ex(const grpc_lookup_v1_RouteLookupConfig* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_RouteLookupConfig_msginit, options, arena, len); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_http_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 72)); } -UPB_INLINE const grpc_lookup_v1_HttpKeyBuilder* const* grpc_lookup_v1_RouteLookupConfig_http_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (const grpc_lookup_v1_HttpKeyBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(44, 72), len); } -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_grpc_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 80)); } -UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder* const* grpc_lookup_v1_RouteLookupConfig_grpc_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (const grpc_lookup_v1_GrpcKeyBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(48, 80), len); } -UPB_INLINE upb_StringView grpc_lookup_v1_RouteLookupConfig_lookup_service(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_StringView); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_lookup_service_timeout(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 1); } -UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_lookup_service_timeout(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const struct google_protobuf_Duration*); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_max_age(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 2); } -UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_max_age(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const struct google_protobuf_Duration*); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_stale_age(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 3); } -UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_stale_age(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const struct google_protobuf_Duration*); -} -UPB_INLINE int64_t grpc_lookup_v1_RouteLookupConfig_cache_size_bytes(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); -} -UPB_INLINE upb_StringView const* grpc_lookup_v1_RouteLookupConfig_valid_targets(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(52, 88), len); } -UPB_INLINE upb_StringView grpc_lookup_v1_RouteLookupConfig_default_target(const grpc_lookup_v1_RouteLookupConfig* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_StringView); -} - -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder** grpc_lookup_v1_RouteLookupConfig_mutable_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { - return (grpc_lookup_v1_HttpKeyBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 72), len); -} -UPB_INLINE grpc_lookup_v1_HttpKeyBuilder** grpc_lookup_v1_RouteLookupConfig_resize_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_HttpKeyBuilder**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 72), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_RouteLookupConfig_add_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { - struct grpc_lookup_v1_HttpKeyBuilder* sub = (struct grpc_lookup_v1_HttpKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_HttpKeyBuilder_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(44, 72), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder** grpc_lookup_v1_RouteLookupConfig_mutable_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { - return (grpc_lookup_v1_GrpcKeyBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 80), len); -} -UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder** grpc_lookup_v1_RouteLookupConfig_resize_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { - return (grpc_lookup_v1_GrpcKeyBuilder**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 80), len, UPB_SIZE(2, 3), arena); -} -UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_RouteLookupConfig_add_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { - struct grpc_lookup_v1_GrpcKeyBuilder* sub = (struct grpc_lookup_v1_GrpcKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_msginit, arena); - bool ok = _upb_Array_Append_accessor2( - msg, UPB_SIZE(48, 80), UPB_SIZE(2, 3), &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_lookup_service(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_StringView) = value; -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_lookup_service_timeout(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { - _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(32, 48), struct google_protobuf_Duration*) = value; -} -UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_lookup_service_timeout(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { - struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_lookup_service_timeout(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); - if (!sub) return NULL; - grpc_lookup_v1_RouteLookupConfig_set_lookup_service_timeout(msg, sub); - } - return sub; -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_max_age(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { - _upb_sethas(msg, 2); - *UPB_PTR_AT(msg, UPB_SIZE(36, 56), struct google_protobuf_Duration*) = value; -} -UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_max_age(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { - struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_max_age(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); - if (!sub) return NULL; - grpc_lookup_v1_RouteLookupConfig_set_max_age(msg, sub); - } - return sub; -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_stale_age(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { - _upb_sethas(msg, 3); - *UPB_PTR_AT(msg, UPB_SIZE(40, 64), struct google_protobuf_Duration*) = value; -} -UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_stale_age(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { - struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_stale_age(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); - if (!sub) return NULL; - grpc_lookup_v1_RouteLookupConfig_set_stale_age(msg, sub); - } - return sub; -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_cache_size_bytes(grpc_lookup_v1_RouteLookupConfig *msg, int64_t value) { - *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; -} -UPB_INLINE upb_StringView* grpc_lookup_v1_RouteLookupConfig_mutable_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { - return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 88), len); -} -UPB_INLINE upb_StringView* grpc_lookup_v1_RouteLookupConfig_resize_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { - return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(52, 88), len, UPB_SIZE(3, 4), arena); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_add_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView val, upb_Arena *arena) { - return _upb_Array_Append_accessor2(msg, UPB_SIZE(52, 88), UPB_SIZE(3, 4), &val, - arena); -} -UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_default_target(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView value) { - *UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_StringView) = value; -} - -/* grpc.lookup.v1.RouteLookupClusterSpecifier */ - -UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_new(upb_Arena* arena) { - return (grpc_lookup_v1_RouteLookupClusterSpecifier*)_upb_Message_New(&grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, arena); -} -UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_parse(const char* buf, size_t size, upb_Arena* arena) { - grpc_lookup_v1_RouteLookupClusterSpecifier* ret = grpc_lookup_v1_RouteLookupClusterSpecifier_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_parse_ex(const char* buf, size_t size, - const upb_ExtensionRegistry* extreg, - int options, upb_Arena* arena) { - grpc_lookup_v1_RouteLookupClusterSpecifier* ret = grpc_lookup_v1_RouteLookupClusterSpecifier_new(arena); - if (!ret) return NULL; - if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, extreg, options, arena) != - kUpb_DecodeStatus_Ok) { - return NULL; - } - return ret; -} -UPB_INLINE char* grpc_lookup_v1_RouteLookupClusterSpecifier_serialize(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg, upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, 0, arena, len); -} -UPB_INLINE char* grpc_lookup_v1_RouteLookupClusterSpecifier_serialize_ex(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg, int options, - upb_Arena* arena, size_t* len) { - return upb_Encode(msg, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, options, arena, len); -} -UPB_INLINE bool grpc_lookup_v1_RouteLookupClusterSpecifier_has_route_lookup_config(const grpc_lookup_v1_RouteLookupClusterSpecifier *msg) { return _upb_hasbit(msg, 1); } -UPB_INLINE const grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg) { - return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_lookup_v1_RouteLookupConfig*); -} - -UPB_INLINE void grpc_lookup_v1_RouteLookupClusterSpecifier_set_route_lookup_config(grpc_lookup_v1_RouteLookupClusterSpecifier *msg, grpc_lookup_v1_RouteLookupConfig* value) { - _upb_sethas(msg, 1); - *UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_lookup_v1_RouteLookupConfig*) = value; -} -UPB_INLINE struct grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupClusterSpecifier_mutable_route_lookup_config(grpc_lookup_v1_RouteLookupClusterSpecifier *msg, upb_Arena *arena) { - struct grpc_lookup_v1_RouteLookupConfig* sub = (struct grpc_lookup_v1_RouteLookupConfig*)grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(msg); - if (sub == NULL) { - sub = (struct grpc_lookup_v1_RouteLookupConfig*)_upb_Message_New(&grpc_lookup_v1_RouteLookupConfig_msginit, arena); - if (!sub) return NULL; - grpc_lookup_v1_RouteLookupClusterSpecifier_set_route_lookup_config(msg, sub); - } - return sub; -} - -extern const upb_MiniTable_File src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#include "upb/port_undef.inc" - -#endif /* SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ */ diff --git a/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c b/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c deleted file mode 100644 index 92c529b67db..00000000000 --- a/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c +++ /dev/null @@ -1,99 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * src/proto/grpc/lookup/v1/rls_config.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#include "upb/def.h" -#include "src/proto/grpc/lookup/v1/rls_config.upbdefs.h" -#include "src/proto/grpc/lookup/v1/rls_config.upb.h" - -extern _upb_DefPool_Init google_protobuf_duration_proto_upbdefinit; -static const char descriptor[1816] = {'\n', ')', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'l', 'o', 'o', 'k', 'u', 'p', '/', 'v', -'1', '/', 'r', 'l', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\016', 'g', 'r', 'p', 'c', '.', -'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', -'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\"', '\\', '\n', '\013', 'N', 'a', 'm', 'e', 'M', -'a', 't', 'c', 'h', 'e', 'r', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', -'\024', '\n', '\005', 'n', 'a', 'm', 'e', 's', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\005', 'n', 'a', 'm', 'e', 's', '\022', '%', '\n', '\016', -'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\r', 'r', 'e', 'q', -'u', 'i', 'r', 'e', 'd', 'M', 'a', 't', 'c', 'h', '\"', '\360', '\003', '\n', '\016', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', -'l', 'd', 'e', 'r', '\022', '9', '\n', '\005', 'n', 'a', 'm', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '#', '.', 'g', 'r', 'p', -'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', -'r', '.', 'N', 'a', 'm', 'e', 'R', '\005', 'n', 'a', 'm', 'e', 's', '\022', 'G', '\n', '\n', 'e', 'x', 't', 'r', 'a', '_', 'k', 'e', -'y', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '(', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', -'.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'E', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's', -'R', '\t', 'e', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's', '\022', '5', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\002', ' ', -'\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e', -'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'U', '\n', '\r', 'c', 'o', 'n', 's', 't', -'a', 'n', 't', '_', 'k', 'e', 'y', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '0', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', -'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'C', 'o', 'n', -'s', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', 'R', '\014', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', 'K', -'e', 'y', 's', '\032', '8', '\n', '\004', 'N', 'a', 'm', 'e', '\022', '\030', '\n', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\001', ' ', -'\001', '(', '\t', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '\026', '\n', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\030', '\002', ' ', -'\001', '(', '\t', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\032', 'Q', '\n', '\t', 'E', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's', '\022', -'\022', '\n', '\004', 'h', 'o', 's', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'h', 'o', 's', 't', '\022', '\030', '\n', '\007', 's', 'e', -'r', 'v', 'i', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '\026', '\n', '\006', 'm', -'e', 't', 'h', 'o', 'd', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\032', '?', '\n', '\021', 'C', 'o', -'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', -'\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', -'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', '\361', '\002', '\n', '\016', 'H', 't', 't', 'p', 'K', 'e', 'y', 'B', 'u', 'i', 'l', -'d', 'e', 'r', '\022', '#', '\n', '\r', 'h', 'o', 's', 't', '_', 'p', 'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\001', ' ', '\003', '(', -'\t', 'R', '\014', 'h', 'o', 's', 't', 'P', 'a', 't', 't', 'e', 'r', 'n', 's', '\022', '#', '\n', '\r', 'p', 'a', 't', 'h', '_', 'p', -'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\014', 'p', 'a', 't', 'h', 'P', 'a', 't', 't', 'e', 'r', -'n', 's', '\022', 'F', '\n', '\020', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\030', '\003', ' ', -'\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e', -'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\017', 'q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\022', -'5', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l', -'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', -'d', 'e', 'r', 's', '\022', 'U', '\n', '\r', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', '_', 'k', 'e', 'y', 's', '\030', '\005', ' ', '\003', -'(', '\013', '2', '0', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'H', 't', 't', 'p', 'K', -'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'C', 'o', 'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', -'r', 'y', 'R', '\014', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', '\032', '?', '\n', '\021', 'C', 'o', 'n', 's', 't', -'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', -'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l', -'u', 'e', ':', '\002', '8', '\001', '\"', '\246', '\004', '\n', '\021', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o', 'n', -'f', 'i', 'g', '\022', 'I', '\n', '\020', 'h', 't', 't', 'p', '_', 'k', 'e', 'y', 'b', 'u', 'i', 'l', 'd', 'e', 'r', 's', '\030', '\001', -' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'H', 't', 't', -'p', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'R', '\017', 'h', 't', 't', 'p', 'K', 'e', 'y', 'b', 'u', 'i', 'l', 'd', -'e', 'r', 's', '\022', 'I', '\n', '\020', 'g', 'r', 'p', 'c', '_', 'k', 'e', 'y', 'b', 'u', 'i', 'l', 'd', 'e', 'r', 's', '\030', '\002', -' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p', -'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'R', '\017', 'g', 'r', 'p', 'c', 'K', 'e', 'y', 'b', 'u', 'i', 'l', 'd', -'e', 'r', 's', '\022', '%', '\n', '\016', 'l', 'o', 'o', 'k', 'u', 'p', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\003', ' ', '\001', -'(', '\t', 'R', '\r', 'l', 'o', 'o', 'k', 'u', 'p', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'O', '\n', '\026', 'l', 'o', 'o', 'k', -'u', 'p', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', -'\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', -'n', 'R', '\024', 'l', 'o', 'o', 'k', 'u', 'p', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '2', -'\n', '\007', 'm', 'a', 'x', '_', 'a', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', -'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\006', 'm', 'a', 'x', 'A', 'g', 'e', -'\022', '6', '\n', '\t', 's', 't', 'a', 'l', 'e', '_', 'a', 'g', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', -'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\010', 's', 't', -'a', 'l', 'e', 'A', 'g', 'e', '\022', '(', '\n', '\020', 'c', 'a', 'c', 'h', 'e', '_', 's', 'i', 'z', 'e', '_', 'b', 'y', 't', 'e', -'s', '\030', '\007', ' ', '\001', '(', '\003', 'R', '\016', 'c', 'a', 'c', 'h', 'e', 'S', 'i', 'z', 'e', 'B', 'y', 't', 'e', 's', '\022', '#', -'\n', '\r', 'v', 'a', 'l', 'i', 'd', '_', 't', 'a', 'r', 'g', 'e', 't', 's', '\030', '\010', ' ', '\003', '(', '\t', 'R', '\014', 'v', 'a', -'l', 'i', 'd', 'T', 'a', 'r', 'g', 'e', 't', 's', '\022', '%', '\n', '\016', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 't', 'a', 'r', -'g', 'e', 't', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'T', 'a', 'r', 'g', 'e', 't', 'J', -'\004', '\010', '\n', '\020', '\013', 'R', '\033', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', 'i', 'n', 'g', -'_', 's', 't', 'r', 'a', 't', 'e', 'g', 'y', '\"', 'p', '\n', '\033', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', -'l', 'u', 's', 't', 'e', 'r', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', 'Q', '\n', '\023', 'r', 'o', 'u', 't', 'e', '_', -'l', 'o', 'o', 'k', 'u', 'p', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'r', 'p', -'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o', -'n', 'f', 'i', 'g', 'R', '\021', 'r', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o', 'n', 'f', 'i', 'g', 'B', 'S', -'\n', '\021', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', 'B', '\016', 'R', 'l', 's', 'C', -'o', 'n', 'f', 'i', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', ',', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', -'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'l', 'o', 'o', 'k', 'u', 'p', '/', 'g', 'r', 'p', 'c', '_', 'l', -'o', 'o', 'k', 'u', 'p', '_', 'v', '1', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', -}; - -static _upb_DefPool_Init *deps[2] = { - &google_protobuf_duration_proto_upbdefinit, - NULL -}; - -_upb_DefPool_Init src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit = { - deps, - &src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout, - "src/proto/grpc/lookup/v1/rls_config.proto", - UPB_STRINGVIEW_INIT(descriptor, 1816) -}; diff --git a/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h b/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h deleted file mode 100644 index 3a7591fa5de..00000000000 --- a/src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h +++ /dev/null @@ -1,75 +0,0 @@ -/* This file was generated by upbc (the upb compiler) from the input - * file: - * - * src/proto/grpc/lookup/v1/rls_config.proto - * - * Do not edit -- your changes will be discarded when the file is - * regenerated. */ - -#ifndef SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ -#define SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ - -#include "upb/def.h" -#include "upb/port_def.inc" -#ifdef __cplusplus -extern "C" { -#endif - -#include "upb/def.h" - -#include "upb/port_def.inc" - -extern _upb_DefPool_Init src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit; - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_NameMatcher_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.NameMatcher"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_Name_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.Name"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_HttpKeyBuilder_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.HttpKeyBuilder"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_RouteLookupConfig_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.RouteLookupConfig"); -} - -UPB_INLINE const upb_MessageDef *grpc_lookup_v1_RouteLookupClusterSpecifier_getmsgdef(upb_DefPool *s) { - _upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); - return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.RouteLookupClusterSpecifier"); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#include "upb/port_undef.inc" - -#endif /* SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/xds/xds_client.cc b/src/core/ext/xds/xds_client.cc index ae246b44a74..400f7fbf5d7 100644 --- a/src/core/ext/xds/xds_client.cc +++ b/src/core/ext/xds/xds_client.cc @@ -38,7 +38,6 @@ #include "src/core/ext/xds/xds_channel_args.h" #include "src/core/ext/xds/xds_client_stats.h" #include "src/core/ext/xds/xds_cluster.h" -#include "src/core/ext/xds/xds_cluster_specifier_plugin.h" #include "src/core/ext/xds/xds_endpoint.h" #include "src/core/ext/xds/xds_http_filters.h" #include "src/core/ext/xds/xds_listener.h" @@ -2334,7 +2333,6 @@ std::string XdsClient::DumpClientConfigBinary() { void XdsClientGlobalInit() { g_mu = new Mutex; XdsHttpFilterRegistry::Init(); - XdsClusterSpecifierPluginRegistry::Init(); } // TODO(roth): Find a better way to clear the fallback config that does @@ -2345,7 +2343,6 @@ void XdsClientGlobalShutdown() ABSL_NO_THREAD_SAFETY_ANALYSIS { delete g_mu; g_mu = nullptr; XdsHttpFilterRegistry::Shutdown(); - XdsClusterSpecifierPluginRegistry::Shutdown(); } namespace { diff --git a/src/core/ext/xds/xds_cluster_specifier_plugin.cc b/src/core/ext/xds/xds_cluster_specifier_plugin.cc deleted file mode 100644 index de3f6934f06..00000000000 --- a/src/core/ext/xds/xds_cluster_specifier_plugin.cc +++ /dev/null @@ -1,144 +0,0 @@ -// -// Copyright 2022 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include - -#include "src/core/ext/xds/xds_cluster_specifier_plugin.h" - -#include "absl/strings/str_format.h" -#include "envoy/extensions/filters/http/router/v3/router.upb.h" -#include "envoy/extensions/filters/http/router/v3/router.upbdefs.h" -#include "google/protobuf/duration.upb.h" -#include "upb/json_encode.h" - -#include "src/core/ext/filters/client_channel/lb_policy_registry.h" -#include "src/core/ext/xds/upb_utils.h" -#include "src/proto/grpc/lookup/v1/rls_config.upb.h" -#include "src/proto/grpc/lookup/v1/rls_config.upbdefs.h" - -namespace grpc_core { - -const char* kXdsRouteLookupClusterSpecifierPluginConfigName = - "grpc.lookup.v1.RouteLookupClusterSpecifier"; - -void XdsRouteLookupClusterSpecifierPlugin::PopulateSymtab( - upb_DefPool* symtab) const { - grpc_lookup_v1_RouteLookupConfig_getmsgdef(symtab); -} - -absl::StatusOr -XdsRouteLookupClusterSpecifierPlugin::GenerateLoadBalancingPolicyConfig( - upb_StringView serialized_plugin_config, upb_Arena* arena, - upb_DefPool* symtab) const { - const auto* specifier = grpc_lookup_v1_RouteLookupClusterSpecifier_parse( - serialized_plugin_config.data, serialized_plugin_config.size, arena); - if (specifier == nullptr) { - return absl::InvalidArgumentError("Could not parse plugin config"); - } - const auto* plugin_config = - grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(specifier); - if (plugin_config == nullptr) { - return absl::InvalidArgumentError( - "Could not get route lookup config from route lookup cluster " - "specifier"); - } - upb::Status status; - const upb_MessageDef* msg_type = - grpc_lookup_v1_RouteLookupConfig_getmsgdef(symtab); - size_t json_size = upb_JsonEncode(plugin_config, msg_type, symtab, 0, nullptr, - 0, status.ptr()); - if (json_size == static_cast(-1)) { - return absl::InvalidArgumentError( - absl::StrCat("failed to dump proto to JSON: ", - upb_Status_ErrorMessage(status.ptr()))); - } - void* buf = upb_Arena_Malloc(arena, json_size + 1); - upb_JsonEncode(plugin_config, msg_type, symtab, 0, - reinterpret_cast(buf), json_size + 1, status.ptr()); - Json::Object rls_policy; - grpc_error_handle error = GRPC_ERROR_NONE; - rls_policy["routeLookupConfig"] = - Json::Parse(reinterpret_cast(buf), &error); - GPR_ASSERT(error == GRPC_ERROR_NONE); - Json::Object cds_policy; - cds_policy["cds_experimental"] = Json::Object(); - Json::Array child_policy; - child_policy.emplace_back(std::move(cds_policy)); - rls_policy["childPolicy"] = std::move(child_policy); - rls_policy["childPolicyConfigTargetFieldName"] = "cluster"; - Json::Object policy; - policy["rls_experimental"] = std::move(rls_policy); - Json::Array policies; - policies.emplace_back(std::move(policy)); - return Json(policies); -} - -namespace { - -using PluginRegistryMap = - std::map>; - -PluginRegistryMap* g_plugin_registry = nullptr; - -} // namespace - -void XdsClusterSpecifierPluginRegistry::PopulateSymtab(upb_DefPool* symtab) { - for (const auto& p : *g_plugin_registry) { - p.second->PopulateSymtab(symtab); - } -} - -void XdsClusterSpecifierPluginRegistry::RegisterPlugin( - std::unique_ptr plugin, - absl::string_view config_proto_type_name) { - (*g_plugin_registry)[config_proto_type_name] = std::move(plugin); -} - -absl::StatusOr -XdsClusterSpecifierPluginRegistry::GenerateLoadBalancingPolicyConfig( - absl::string_view proto_type_name, upb_StringView serialized_plugin_config, - upb_Arena* arena, upb_DefPool* symtab) { - auto it = g_plugin_registry->find(proto_type_name); - if (it == g_plugin_registry->end()) { - return absl::InvalidArgumentError( - "Unable to locate the cluster specifier plugin in the registry"); - } - auto lb_policy_config = it->second->GenerateLoadBalancingPolicyConfig( - serialized_plugin_config, arena, symtab); - if (!lb_policy_config.ok()) return lb_policy_config.status(); - grpc_error_handle parse_error = GRPC_ERROR_NONE; - LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(*lb_policy_config, - &parse_error); - if (parse_error != GRPC_ERROR_NONE) { - absl::Status status = absl::InvalidArgumentError(absl::StrCat( - proto_type_name, - " ClusterSpecifierPlugin returned invalid LB policy config: ", - grpc_error_std_string(parse_error))); - GRPC_ERROR_UNREF(parse_error); - return status; - } - return lb_policy_config->Dump(); -} - -void XdsClusterSpecifierPluginRegistry::Init() { - g_plugin_registry = new PluginRegistryMap; - RegisterPlugin(absl::make_unique(), - kXdsRouteLookupClusterSpecifierPluginConfigName); -} - -void XdsClusterSpecifierPluginRegistry::Shutdown() { delete g_plugin_registry; } - -} // namespace grpc_core diff --git a/src/core/ext/xds/xds_cluster_specifier_plugin.h b/src/core/ext/xds/xds_cluster_specifier_plugin.h deleted file mode 100644 index 1d688cfc02e..00000000000 --- a/src/core/ext/xds/xds_cluster_specifier_plugin.h +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright 2022 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H -#define GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H - -#include - -#include -#include -#include - -#include "absl/status/statusor.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" -#include "google/protobuf/any.upb.h" -#include "upb/def.h" - -#include - -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/json/json.h" - -namespace grpc_core { - -class XdsClusterSpecifierPluginImpl { - public: - virtual ~XdsClusterSpecifierPluginImpl() = default; - - // Loads the proto message into the upb symtab. - virtual void PopulateSymtab(upb_DefPool* symtab) const = 0; - - // Returns the LB policy config in JSON form. - virtual absl::StatusOr GenerateLoadBalancingPolicyConfig( - upb_StringView serialized_plugin_config, upb_Arena* arena, - upb_DefPool* symtab) const = 0; -}; - -class XdsRouteLookupClusterSpecifierPlugin - : public XdsClusterSpecifierPluginImpl { - void PopulateSymtab(upb_DefPool* symtab) const override; - - absl::StatusOr GenerateLoadBalancingPolicyConfig( - upb_StringView serialized_plugin_config, upb_Arena* arena, - upb_DefPool* symtab) const override; -}; - -class XdsClusterSpecifierPluginRegistry { - public: - static void RegisterPlugin( - std::unique_ptr plugin, - absl::string_view config_proto_type_name); - - static void PopulateSymtab(upb_DefPool* symtab); - - static absl::StatusOr GenerateLoadBalancingPolicyConfig( - absl::string_view proto_type_name, - upb_StringView serialized_plugin_config, upb_Arena* arena, - upb_DefPool* symtab); - - // Global init and shutdown. - static void Init(); - static void Shutdown(); -}; - -} // namespace grpc_core - -#endif // GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H diff --git a/src/core/ext/xds/xds_common_types.cc b/src/core/ext/xds/xds_common_types.cc index 37083181321..bfa0ecad173 100644 --- a/src/core/ext/xds/xds_common_types.cc +++ b/src/core/ext/xds/xds_common_types.cc @@ -365,23 +365,23 @@ grpc_error_handle CommonTlsContext::Parse( &errors); } -grpc_error_handle ExtractExtensionTypeName(const XdsEncodingContext& context, - const google_protobuf_Any* any, - absl::string_view* extension_type) { - *extension_type = UpbStringToAbsl(google_protobuf_Any_type_url(any)); - if (*extension_type == "type.googleapis.com/xds.type.v3.TypedStruct" || - *extension_type == "type.googleapis.com/udpa.type.v1.TypedStruct") { +grpc_error_handle ExtractHttpFilterTypeName(const XdsEncodingContext& context, + const google_protobuf_Any* any, + absl::string_view* filter_type) { + *filter_type = UpbStringToAbsl(google_protobuf_Any_type_url(any)); + if (*filter_type == "type.googleapis.com/xds.type.v3.TypedStruct" || + *filter_type == "type.googleapis.com/udpa.type.v1.TypedStruct") { upb_StringView any_value = google_protobuf_Any_value(any); const auto* typed_struct = xds_type_v3_TypedStruct_parse( any_value.data, any_value.size, context.arena); if (typed_struct == nullptr) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "could not parse TypedStruct from extension"); + "could not parse TypedStruct from filter config"); } - *extension_type = + *filter_type = UpbStringToAbsl(xds_type_v3_TypedStruct_type_url(typed_struct)); } - *extension_type = absl::StripPrefix(*extension_type, "type.googleapis.com/"); + *filter_type = absl::StripPrefix(*filter_type, "type.googleapis.com/"); return GRPC_ERROR_NONE; } diff --git a/src/core/ext/xds/xds_common_types.h b/src/core/ext/xds/xds_common_types.h index c5e118bd828..df96e8c93ff 100644 --- a/src/core/ext/xds/xds_common_types.h +++ b/src/core/ext/xds/xds_common_types.h @@ -86,9 +86,9 @@ struct CommonTlsContext { CommonTlsContext* common_tls_context); }; -grpc_error_handle ExtractExtensionTypeName(const XdsEncodingContext& context, - const google_protobuf_Any* any, - absl::string_view* extension_type); +grpc_error_handle ExtractHttpFilterTypeName(const XdsEncodingContext& context, + const google_protobuf_Any* any, + absl::string_view* filter_type); } // namespace grpc_core diff --git a/src/core/ext/xds/xds_listener.cc b/src/core/ext/xds/xds_listener.cc index 14847e31d19..24cde3609fe 100644 --- a/src/core/ext/xds/xds_listener.cc +++ b/src/core/ext/xds/xds_listener.cc @@ -332,7 +332,7 @@ grpc_error_handle HttpConnectionManagerParse( } absl::string_view filter_type; grpc_error_handle error = - ExtractExtensionTypeName(context, any, &filter_type); + ExtractHttpFilterTypeName(context, any, &filter_type); if (error != GRPC_ERROR_NONE) return error; const XdsHttpFilterImpl* filter_impl = XdsHttpFilterRegistry::GetFilterForType(filter_type); diff --git a/src/core/ext/xds/xds_route_config.cc b/src/core/ext/xds/xds_route_config.cc index 6720c90a2bc..c894ad6800d 100644 --- a/src/core/ext/xds/xds_route_config.cc +++ b/src/core/ext/xds/xds_route_config.cc @@ -23,7 +23,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "envoy/config/core/v3/base.upb.h" -#include "envoy/config/core/v3/extension.upb.h" #include "envoy/config/route/v3/route.upb.h" #include "envoy/config/route/v3/route.upbdefs.h" #include "envoy/config/route/v3/route_components.upb.h" @@ -40,14 +39,12 @@ #include "src/core/ext/xds/upb_utils.h" #include "src/core/ext/xds/xds_api.h" -#include "src/core/ext/xds/xds_cluster_specifier_plugin.h" #include "src/core/ext/xds/xds_common_types.h" #include "src/core/ext/xds/xds_resource_type.h" #include "src/core/ext/xds/xds_routing.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/error.h" -#include "src/core/lib/transport/error_utils.h" namespace grpc_core { @@ -60,15 +57,6 @@ bool XdsRbacEnabled() { return parse_succeeded && parsed_value; } -// TODO(donnadionne): Remove once RLS is no longer experimental -bool XdsRlsEnabled() { - char* value = gpr_getenv("GRPC_EXPERIMENTAL_XDS_RLS_LB"); - bool parsed_value; - bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value); - gpr_free(value); - return parse_succeeded && parsed_value; -} - // // XdsRouteConfigResource::RetryPolicy // @@ -224,18 +212,11 @@ std::string XdsRouteConfigResource::Route::RouteAction::ToString() const { if (retry_policy.has_value()) { contents.push_back(absl::StrCat("retry_policy=", retry_policy->ToString())); } - if (action.index() == kClusterIndex) { - contents.push_back( - absl::StrFormat("Cluster name: %s", absl::get(action))); - } else if (action.index() == kWeightedClustersIndex) { - auto& action_weighted_clusters = absl::get(action); - for (const ClusterWeight& cluster_weight : action_weighted_clusters) { - contents.push_back(cluster_weight.ToString()); - } - } else if (action.index() == kClusterSpecifierPluginIndex) { - contents.push_back( - absl::StrFormat("Cluster specifier plugin name: %s", - absl::get(action))); + if (!cluster_name.empty()) { + contents.push_back(absl::StrFormat("Cluster name: %s", cluster_name)); + } + for (const ClusterWeight& cluster_weight : weighted_clusters) { + contents.push_back(cluster_weight.ToString()); } if (max_stream_duration.has_value()) { contents.push_back(max_stream_duration->ToString()); @@ -277,78 +258,35 @@ std::string XdsRouteConfigResource::Route::ToString() const { // std::string XdsRouteConfigResource::ToString() const { - std::vector parts; + std::vector vhosts; for (const VirtualHost& vhost : virtual_hosts) { - parts.push_back( + vhosts.push_back( absl::StrCat("vhost={\n" " domains=[", absl::StrJoin(vhost.domains, ", "), "]\n" " routes=[\n")); for (const XdsRouteConfigResource::Route& route : vhost.routes) { - parts.push_back(" {\n"); - parts.push_back(route.ToString()); - parts.push_back("\n }\n"); + vhosts.push_back(" {\n"); + vhosts.push_back(route.ToString()); + vhosts.push_back("\n }\n"); } - parts.push_back(" ]\n"); - parts.push_back(" typed_per_filter_config={\n"); + vhosts.push_back(" ]\n"); + vhosts.push_back(" typed_per_filter_config={\n"); for (const auto& p : vhost.typed_per_filter_config) { const std::string& name = p.first; const auto& config = p.second; - parts.push_back(absl::StrCat(" ", name, "=", config.ToString(), "\n")); + vhosts.push_back( + absl::StrCat(" ", name, "=", config.ToString(), "\n")); } - parts.push_back(" }\n"); - parts.push_back("]\n"); + vhosts.push_back(" }\n"); + vhosts.push_back("]\n"); } - parts.push_back("cluster_specifier_plugins={\n"); - for (const auto& it : cluster_specifier_plugin_map) { - parts.push_back(absl::StrFormat("%s={%s}\n", it.first, it.second)); - } - parts.push_back("}"); - return absl::StrJoin(parts, ""); + return absl::StrJoin(vhosts, ""); } namespace { -grpc_error_handle ClusterSpecifierPluginParse( - const XdsEncodingContext& context, - const envoy_config_route_v3_RouteConfiguration* route_config, - XdsRouteConfigResource* rds_update) { - size_t num_cluster_specifier_plugins; - const envoy_config_route_v3_ClusterSpecifierPlugin* const* - cluster_specifier_plugin = - envoy_config_route_v3_RouteConfiguration_cluster_specifier_plugins( - route_config, &num_cluster_specifier_plugins); - for (size_t i = 0; i < num_cluster_specifier_plugins; ++i) { - const envoy_config_core_v3_TypedExtensionConfig* extension = - envoy_config_route_v3_ClusterSpecifierPlugin_extension( - cluster_specifier_plugin[i]); - std::string name = UpbStringToStdString( - envoy_config_core_v3_TypedExtensionConfig_name(extension)); - const google_protobuf_Any* any = - envoy_config_core_v3_TypedExtensionConfig_typed_config(extension); - if (any == nullptr) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "could not obtrain TypedExtensionConfig for plugin config"); - } - absl::string_view plugin_type; - grpc_error_handle error = - ExtractExtensionTypeName(context, any, &plugin_type); - if (error != GRPC_ERROR_NONE) return error; - // Find the plugin and generate the policy. - auto lb_policy_config = - XdsClusterSpecifierPluginRegistry::GenerateLoadBalancingPolicyConfig( - plugin_type, google_protobuf_Any_value(any), context.arena, - context.symtab); - if (!lb_policy_config.ok()) { - return absl_status_to_grpc_error(lb_policy_config.status()); - } - rds_update->cluster_specifier_plugin_map[std::move(name)] = - std::move(lb_policy_config.value()); - } - return GRPC_ERROR_NONE; -} - grpc_error_handle RoutePathMatchParse( const envoy_config_route_v3_RouteMatch* match, XdsRouteConfigResource::Route* route, bool* ignore_route) { @@ -585,7 +523,7 @@ grpc_error_handle ParseTypedPerFilterConfig( } } grpc_error_handle error = - ExtractExtensionTypeName(context, any, &filter_type); + ExtractHttpFilterTypeName(context, any, &filter_type); if (error != GRPC_ERROR_NONE) return error; const XdsHttpFilterImpl* filter_impl = XdsHttpFilterRegistry::GetFilterForType(filter_type); @@ -685,27 +623,19 @@ grpc_error_handle RetryPolicyParse( grpc_error_handle RouteActionParse( const XdsEncodingContext& context, const envoy_config_route_v3_Route* route_msg, - const std::map& - cluster_specifier_plugin_map, XdsRouteConfigResource::Route::RouteAction* route, bool* ignore_route) { const envoy_config_route_v3_RouteAction* route_action = envoy_config_route_v3_Route_route(route_msg); // Get the cluster or weighted_clusters in the RouteAction. if (envoy_config_route_v3_RouteAction_has_cluster(route_action)) { - std::string cluster_name = UpbStringToStdString( + route->cluster_name = UpbStringToStdString( envoy_config_route_v3_RouteAction_cluster(route_action)); - if (cluster_name.empty()) { + if (route->cluster_name.empty()) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "RouteAction cluster contains empty cluster name."); } - route->action - .emplace( - std::move(cluster_name)); } else if (envoy_config_route_v3_RouteAction_has_weighted_clusters( route_action)) { - std::vector - action_weighted_clusters; const envoy_config_route_v3_WeightedCluster* weighted_cluster = envoy_config_route_v3_RouteAction_weighted_clusters(route_action); uint32_t total_weight = 100; @@ -752,39 +682,18 @@ grpc_error_handle RouteActionParse( &cluster.typed_per_filter_config); if (error != GRPC_ERROR_NONE) return error; } - action_weighted_clusters.emplace_back(std::move(cluster)); + route->weighted_clusters.emplace_back(std::move(cluster)); } if (total_weight != sum_of_weights) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "RouteAction weighted_cluster has incorrect total weight"); } - if (action_weighted_clusters.empty()) { + if (route->weighted_clusters.empty()) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "RouteAction weighted_cluster has no valid clusters specified."); } - route->action = std::move(action_weighted_clusters); - } else if (XdsRlsEnabled() && - envoy_config_route_v3_RouteAction_has_cluster_specifier_plugin( - route_action)) { - std::string plugin_name = UpbStringToStdString( - envoy_config_route_v3_RouteAction_cluster_specifier_plugin( - route_action)); - if (plugin_name.empty()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "RouteAction cluster contains empty cluster specifier plugin name."); - } - if (cluster_specifier_plugin_map.find(plugin_name) == - cluster_specifier_plugin_map.end()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "RouteAction cluster contains cluster specifier plugin name not " - "configured."); - } - route->action.emplace( - std::move(plugin_name)); } else { - // No cluster or weighted_clusters or plugin found in RouteAction, ignore - // this route. + // No cluster or weighted_clusters found in RouteAction, ignore this route. *ignore_route = true; } if (!*ignore_route) { @@ -899,12 +808,6 @@ grpc_error_handle XdsRouteConfigResource::Parse( const XdsEncodingContext& context, const envoy_config_route_v3_RouteConfiguration* route_config, XdsRouteConfigResource* rds_update) { - // Get the cluster spcifier plugins - if (XdsRlsEnabled()) { - grpc_error_handle error = - ClusterSpecifierPluginParse(context, route_config, rds_update); - if (error != GRPC_ERROR_NONE) return error; - } // Get the virtual hosts. size_t num_virtual_hosts; const envoy_config_route_v3_VirtualHost* const* virtual_hosts = @@ -959,12 +862,6 @@ grpc_error_handle XdsRouteConfigResource::Parse( return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "No route found in the virtual host."); } - // Build a set of cluster_specifier_plugin configured to make sure each is - // actually referenced by a route action. - std::set cluster_specifier_plugins; - for (auto& plugin : rds_update->cluster_specifier_plugin_map) { - cluster_specifier_plugins.emplace(plugin.first); - } // Loop over the whole list of routes for (size_t j = 0; j < num_routes; ++j) { const envoy_config_route_v3_RouteMatch* match = @@ -992,23 +889,14 @@ grpc_error_handle XdsRouteConfigResource::Parse( route.action.emplace(); auto& route_action = absl::get(route.action); - error = RouteActionParse(context, routes[j], - rds_update->cluster_specifier_plugin_map, - &route_action, &ignore_route); + error = + RouteActionParse(context, routes[j], &route_action, &ignore_route); if (error != GRPC_ERROR_NONE) return error; if (ignore_route) continue; if (route_action.retry_policy == absl::nullopt && retry_policy != nullptr) { route_action.retry_policy = virtual_host_retry_policy; } - // Mark off plugins used in route action. - std::string* cluster_specifier_action = - absl::get_if( - &route_action.action); - if (cluster_specifier_action != nullptr) { - cluster_specifier_plugins.erase(*cluster_specifier_action); - } } else if (envoy_config_route_v3_Route_has_non_forwarding_action( routes[j])) { route.action @@ -1030,12 +918,6 @@ grpc_error_handle XdsRouteConfigResource::Parse( if (vhost.routes.empty()) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING("No valid routes specified."); } - // For plugins not used in route action, delete from the update to prevent - // further use. - for (auto& unused_plugin : cluster_specifier_plugins) { - rds_update->cluster_specifier_plugin_map.erase( - std::string(unused_plugin)); - } } return GRPC_ERROR_NONE; } diff --git a/src/core/ext/xds/xds_route_config.h b/src/core/ext/xds/xds_route_config.h index dd719b0c86c..08803a09815 100644 --- a/src/core/ext/xds/xds_route_config.h +++ b/src/core/ext/xds/xds_route_config.h @@ -30,7 +30,6 @@ #include "re2/re2.h" #include "src/core/ext/xds/xds_client.h" -#include "src/core/ext/xds/xds_cluster_specifier_plugin.h" #include "src/core/ext/xds/xds_common_types.h" #include "src/core/ext/xds/xds_http_filters.h" #include "src/core/ext/xds/xds_resource_type_impl.h" @@ -68,6 +67,8 @@ struct XdsRouteConfigResource { std::string ToString() const; }; + // TODO(donnadionne): When we can use absl::variant<>, consider using that + // for: PathMatcher, HeaderMatcher, cluster_name and weighted_clusters struct Route { // Matchers for this route. struct Matchers { @@ -129,11 +130,10 @@ struct XdsRouteConfigResource { absl::optional retry_policy; // Action for this route. - static constexpr size_t kClusterIndex = 0; - static constexpr size_t kWeightedClustersIndex = 1; - static constexpr size_t kClusterSpecifierPluginIndex = 2; - absl::variant, std::string> - action; + // TODO(roth): When we can use absl::variant<>, consider using that + // here, to enforce the fact that only one of the two fields can be set. + std::string cluster_name; + std::vector weighted_clusters; // Storing the timeout duration from route action: // RouteAction.max_stream_duration.grpc_timeout_header_max or // RouteAction.max_stream_duration.max_stream_duration if the former is @@ -142,7 +142,9 @@ struct XdsRouteConfigResource { bool operator==(const RouteAction& other) const { return hash_policies == other.hash_policies && - retry_policy == other.retry_policy && action == other.action && + retry_policy == other.retry_policy && + cluster_name == other.cluster_name && + weighted_clusters == other.weighted_clusters && max_stream_duration == other.max_stream_duration; } std::string ToString() const; @@ -176,13 +178,9 @@ struct XdsRouteConfigResource { }; std::vector virtual_hosts; - std::map - cluster_specifier_plugin_map; bool operator==(const XdsRouteConfigResource& other) const { - return virtual_hosts == other.virtual_hosts && - cluster_specifier_plugin_map == other.cluster_specifier_plugin_map; + return virtual_hosts == other.virtual_hosts; } std::string ToString() const; @@ -209,7 +207,6 @@ class XdsRouteConfigResourceType void InitUpbSymtab(upb_DefPool* symtab) const override { envoy_config_route_v3_RouteConfiguration_getmsgdef(symtab); - XdsClusterSpecifierPluginRegistry::PopulateSymtab(symtab); } }; diff --git a/src/core/lib/json/json_util.h b/src/core/lib/json/json_util.h index 9582ab21f9e..29de52d8173 100644 --- a/src/core/lib/json/json_util.h +++ b/src/core/lib/json/json_util.h @@ -45,9 +45,9 @@ bool ExtractJsonNumber(const Json& json, absl::string_view field_name, NumericType* output, std::vector* error_list) { static_assert(std::is_integral::value, "Integral required"); - if (json.type() != Json::Type::NUMBER && json.type() != Json::Type::STRING) { - error_list->push_back(GRPC_ERROR_CREATE_FROM_CPP_STRING(absl::StrCat( - "field:", field_name, " error:type should be NUMBER or STRING"))); + if (json.type() != Json::Type::NUMBER) { + error_list->push_back(GRPC_ERROR_CREATE_FROM_CPP_STRING( + absl::StrCat("field:", field_name, " error:type should be NUMBER"))); return false; } if (!absl::SimpleAtoi(json.string_value(), output)) { diff --git a/src/proto/grpc/lookup/v1/BUILD b/src/proto/grpc/lookup/v1/BUILD index 81cf765b56f..0701ec0e674 100644 --- a/src/proto/grpc/lookup/v1/BUILD +++ b/src/proto/grpc/lookup/v1/BUILD @@ -28,21 +28,7 @@ grpc_proto_library( well_known_protos = True, ) -grpc_proto_library( - name = "rls_config_proto", - srcs = ["rls_config.proto"], - well_known_protos = True, -) - proto_library( name = "rls_proto_descriptor", srcs = ["rls.proto"], ) - -proto_library( - name = "rls_config_proto_descriptor", - srcs = ["rls_config.proto"], - deps = [ - "@com_google_protobuf//:duration_proto", - ], -) diff --git a/src/proto/grpc/testing/xds/v3/BUILD b/src/proto/grpc/testing/xds/v3/BUILD index fe2ee270bf9..2c87a97ea76 100644 --- a/src/proto/grpc/testing/xds/v3/BUILD +++ b/src/proto/grpc/testing/xds/v3/BUILD @@ -197,7 +197,6 @@ grpc_proto_library( well_known_protos = True, deps = [ "base_proto", - "extension_proto", "percent_proto", "range_proto", "regex_proto", diff --git a/src/proto/grpc/testing/xds/v3/route.proto b/src/proto/grpc/testing/xds/v3/route.proto index 02133d8de36..7109fe21db1 100644 --- a/src/proto/grpc/testing/xds/v3/route.proto +++ b/src/proto/grpc/testing/xds/v3/route.proto @@ -19,7 +19,6 @@ syntax = "proto3"; package envoy.config.route.v3; import "src/proto/grpc/testing/xds/v3/base.proto"; -import "src/proto/grpc/testing/xds/v3/extension.proto"; import "src/proto/grpc/testing/xds/v3/regex.proto"; import "src/proto/grpc/testing/xds/v3/percent.proto"; import "src/proto/grpc/testing/xds/v3/range.proto"; @@ -269,13 +268,6 @@ message RouteAction { // :ref:`traffic splitting ` // for additional documentation. WeightedCluster weighted_clusters = 3; - - // Name of the cluster specifier plugin to use to determine the cluster for - // requests on this route. The plugin name must be defined in the associated - // :ref:`envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins` - // in the - // :ref:`envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name` field. - string cluster_specifier_plugin = 37; } message HashPolicy { @@ -443,12 +435,6 @@ message HeaderMatcher { message QueryParameterMatcher { } -// Configuration for a cluster specifier plugin. -message ClusterSpecifierPlugin { - // The name of the plugin and its opaque configuration. - core.v3.TypedExtensionConfig extension = 1; -} - // [#protodoc-title: HTTP route configuration] // * Routing :ref:`architecture overview ` // * HTTP :ref:`router filter ` @@ -463,11 +449,6 @@ message RouteConfiguration { // An array of virtual hosts that make up the route table. repeated VirtualHost virtual_hosts = 2; - - // A list of plugins and their configurations which may be used by a - // :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin` - // within the route. All *extension.name* fields in this list must be unique. - repeated ClusterSpecifierPlugin cluster_specifier_plugins = 12; } message RedirectAction { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index f1d0e689883..7305945dc3f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -235,7 +235,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c', - 'src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', 'src/core/ext/upb-generated/udpa/annotations/security.upb.c', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', @@ -370,7 +369,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c', 'src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c', 'src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c', - 'src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c', 'src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c', @@ -403,7 +401,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/xds/xds_client.cc', 'src/core/ext/xds/xds_client_stats.cc', 'src/core/ext/xds/xds_cluster.cc', - 'src/core/ext/xds/xds_cluster_specifier_plugin.cc', 'src/core/ext/xds/xds_common_types.cc', 'src/core/ext/xds/xds_endpoint.cc', 'src/core/ext/xds/xds_http_fault_filter.cc', @@ -1174,7 +1171,6 @@ CORE_SOURCE_FILES = [ 'third_party/upb/upb/decode_fast.c', 'third_party/upb/upb/def.c', 'third_party/upb/upb/encode.c', - 'third_party/upb/upb/json_encode.c', 'third_party/upb/upb/msg.c', 'third_party/upb/upb/reflection.c', 'third_party/upb/upb/table.c', diff --git a/src/upb/gen_build_yaml.py b/src/upb/gen_build_yaml.py index 939d71b3991..d347eb554f4 100755 --- a/src/upb/gen_build_yaml.py +++ b/src/upb/gen_build_yaml.py @@ -36,7 +36,6 @@ try: "third_party/upb/upb/decode.c", "third_party/upb/upb/def.c", "third_party/upb/upb/encode.c", - "third_party/upb/upb/json_encode.c", "third_party/upb/upb/msg.c", "third_party/upb/upb/reflection.c", "third_party/upb/upb/table.c", @@ -53,7 +52,6 @@ try: "third_party/upb/upb/def.h", "third_party/upb/upb/def.hpp", "third_party/upb/upb/encode.h", - "third_party/upb/upb/json_encode.h", "third_party/upb/upb/msg_internal.h", "third_party/upb/upb/msg.h", "third_party/upb/upb/port_def.inc", diff --git a/test/core/client_channel/rls_lb_config_parser_test.cc b/test/core/client_channel/rls_lb_config_parser_test.cc index 7ac0efef283..3089e33c988 100644 --- a/test/core/client_channel/rls_lb_config_parser_test.cc +++ b/test/core/client_channel/rls_lb_config_parser_test.cc @@ -35,16 +35,22 @@ namespace { class RlsConfigParsingTest : public ::testing::Test { public: - static void SetUpTestSuite() { grpc_init(); } + static void SetUpTestSuite() { + gpr_setenv("GRPC_EXPERIMENTAL_ENABLE_RLS_LB_POLICY", "true"); + grpc_init(); + } - static void TearDownTestSuite() { grpc_shutdown_blocking(); } + static void TearDownTestSuite() { + grpc_shutdown_blocking(); + gpr_unsetenv("GRPC_EXPERIMENTAL_ENABLE_RLS_LB_POLICY"); + } }; TEST_F(RlsConfigParsingTest, ValidConfig) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"lookupService\":\"rls.example.com:80\",\n" " \"cacheSizeBytes\":1,\n" @@ -82,7 +88,7 @@ TEST_F(RlsConfigParsingTest, TopLevelRequiredFieldsMissing) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " }\n" " }]\n" "}\n"; @@ -103,7 +109,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsWrongTypes) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":1,\n" " \"routeLookupChannelServiceConfig\": 1,\n" " \"childPolicy\":1,\n" @@ -129,7 +135,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsInvalidValues) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"childPolicy\":[\n" " {\"unknown\":{}}\n" " ],\n" @@ -154,7 +160,7 @@ TEST_F(RlsConfigParsingTest, InvalidChildPolicyConfig) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"childPolicy\":[\n" " {\"grpclb\":{\"childPolicy\":1}}\n" " ],\n" @@ -178,7 +184,7 @@ TEST_F(RlsConfigParsingTest, InvalidRlsChannelServiceConfig) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupChannelServiceConfig\": {\n" " \"loadBalancingPolicy\": \"unknown\"\n" " },\n" @@ -211,7 +217,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigRequiredFieldsMissing) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " }\n" " }\n" @@ -233,7 +239,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsWrongTypes) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":1,\n" " \"name\":1,\n" @@ -258,7 +264,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsWrongTypes) { "field:lookupService error:type should be STRING.*" "field:maxAge error:type should be STRING.*" "field:staleAge error:type should be STRING.*" - "field:cacheSizeBytes error:failed to parse.*" + "field:cacheSizeBytes error:type should be NUMBER.*" "field:defaultTarget error:type should be STRING")); GRPC_ERROR_UNREF(error); } @@ -267,7 +273,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsInvalidValues) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"lookupService\":\"\",\n" " \"cacheSizeBytes\":0\n" @@ -295,7 +301,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderRequiredFieldsMissing) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -322,7 +328,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderWrongFieldTypes) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -356,7 +362,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidValues) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -397,7 +403,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidHeaders) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -457,7 +463,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderNameWrongFieldTypes) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -494,7 +500,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInSameKeyBuilder) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" @@ -531,7 +537,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInDifferentKeyBuilders) { const char* service_config_json = "{\n" " \"loadBalancingConfig\":[{\n" - " \"rls_experimental\":{\n" + " \"rls\":{\n" " \"routeLookupConfig\":{\n" " \"grpcKeybuilders\":[\n" " {\n" diff --git a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc index 400c6281c58..9ab1102c4dc 100644 --- a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc +++ b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc @@ -410,7 +410,7 @@ TEST(RbacServiceConfigParsingTest, VariousPermissionsAndPrincipalsBadTypes) { "permissions\\[5\\]" CHILD_ERROR_TAG "field:destinationIp error:type should be OBJECT.*" "permissions\\[6\\]" CHILD_ERROR_TAG - "field:destinationPort error:failed to parse.*" + "field:destinationPort error:type should be NUMBER.*" "permissions\\[7\\]" CHILD_ERROR_TAG "field:metadata error:type should be OBJECT.*" "permissions\\[8\\]" CHILD_ERROR_TAG diff --git a/test/core/xds/google_mesh_ca_certificate_provider_factory_test.cc b/test/core/xds/google_mesh_ca_certificate_provider_factory_test.cc index cbbad3c5988..b5ee4fbbb63 100644 --- a/test/core/xds/google_mesh_ca_certificate_provider_factory_test.cc +++ b/test/core/xds/google_mesh_ca_certificate_provider_factory_test.cc @@ -214,7 +214,7 @@ TEST(GoogleMeshCaConfigTest, WrongTypes) { " \"certificate_lifetime\": 400," " \"renewal_grace_period\": 100," " \"key_type\": 123," - " \"key_size\": \"1024A\"," + " \"key_size\": \"1024\"," " \"location\": 123" "}"; grpc_error_handle error = GRPC_ERROR_NONE; @@ -245,7 +245,7 @@ TEST(GoogleMeshCaConfigTest, WrongTypes) { "field:renewal_grace_period error:type should be STRING of the form " "given by google.proto.Duration..*" "field:key_type error:type should be STRING.*" - "field:key_size error:failed to parse.*" + "field:key_size error:type should be NUMBER.*" "field:location error:type should be STRING")); GRPC_ERROR_UNREF(error); } diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 32bcf8bea58..2bae92a3b17 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -70,21 +70,6 @@ grpc_cc_library( ], ) -grpc_cc_library( - name = "rls_server", - testonly = True, - srcs = ["rls_server.cc"], - hdrs = ["rls_server.h"], - external_deps = [ - "gtest", - ], - deps = [ - ":counted_service", - "//src/proto/grpc/lookup/v1:rls_proto", - "//test/core/util:grpc_test_util", - ], -) - grpc_cc_test( name = "async_end2end_test", srcs = ["async_end2end_test.cc"], @@ -502,7 +487,6 @@ grpc_cc_test( tags = ["no_test_ios"], deps = [ ":counted_service", - ":rls_server", ":test_service_impl", "//:gpr", "//:grpc", diff --git a/test/cpp/end2end/rls_end2end_test.cc b/test/cpp/end2end/rls_end2end_test.cc index c35766b5ebd..a759ffc5664 100644 --- a/test/cpp/end2end/rls_end2end_test.cc +++ b/test/cpp/end2end/rls_end2end_test.cc @@ -60,11 +60,11 @@ #include "test/core/util/test_config.h" #include "test/core/util/test_lb_policies.h" #include "test/cpp/end2end/counted_service.h" -#include "test/cpp/end2end/rls_server.h" #include "test/cpp/end2end/test_service_impl.h" #include "test/cpp/util/test_config.h" using ::grpc::lookup::v1::RouteLookupRequest; +using ::grpc::lookup::v1::RouteLookupResponse; namespace grpc { namespace testing { @@ -87,6 +87,92 @@ const char* kConstantKey = "constant_key"; const char* kConstantValue = "constant_value"; using BackendService = CountedService; +using RlsService = + CountedService; + +class RlsServiceImpl : public RlsService { + public: + grpc::Status RouteLookup(grpc::ServerContext* context, + const RouteLookupRequest* request, + RouteLookupResponse* response) override { + gpr_log(GPR_INFO, "RLS: Received request: %s", + request->DebugString().c_str()); + // RLS server should see call creds. + EXPECT_THAT(context->client_metadata(), + ::testing::Contains( + ::testing::Pair(kCallCredsMdKey, kCallCredsMdValue))); + IncreaseRequestCount(); + EXPECT_EQ(request->target_type(), "grpc"); + // See if we have a configured response for this request. + ResponseData res; + { + grpc::internal::MutexLock lock(&mu_); + auto it = responses_.find(*request); + if (it == responses_.end()) { + gpr_log(GPR_INFO, "RLS: no matching request, returning INTERNAL"); + unmatched_requests_.push_back(*request); + return Status(StatusCode::INTERNAL, "no response entry"); + } + res = it->second; + } + // Configured response found, so use it. + if (res.response_delay > grpc_core::Duration::Zero()) { + gpr_sleep_until( + grpc_timeout_milliseconds_to_deadline(res.response_delay.millis())); + } + IncreaseResponseCount(); + *response = res.response; + gpr_log(GPR_INFO, "RLS: returning configured response: %s", + response->DebugString().c_str()); + return Status::OK; + } + + void Start() {} + + void Shutdown() {} + + void SetResponse(RouteLookupRequest request, RouteLookupResponse response, + grpc_core::Duration response_delay = grpc_core::Duration()) { + grpc::internal::MutexLock lock(&mu_); + responses_[std::move(request)] = {std::move(response), response_delay}; + } + + void RemoveResponse(const RouteLookupRequest& request) { + grpc::internal::MutexLock lock(&mu_); + responses_.erase(request); + } + + std::vector GetUnmatchedRequests() { + grpc::internal::MutexLock lock(&mu_); + return std::move(unmatched_requests_); + } + + private: + // Sorting thunk for RouteLookupRequest. + struct RlsRequestLessThan { + bool operator()(const RouteLookupRequest& req1, + const RouteLookupRequest& req2) const { + std::map key_map1( + req1.key_map().begin(), req1.key_map().end()); + std::map key_map2( + req2.key_map().begin(), req2.key_map().end()); + if (key_map1 < key_map2) return true; + if (req1.reason() < req2.reason()) return true; + if (req1.stale_header_data() < req2.stale_header_data()) return true; + return false; + } + }; + + struct ResponseData { + RouteLookupResponse response; + grpc_core::Duration response_delay; + }; + + grpc::internal::Mutex mu_; + std::map responses_ + ABSL_GUARDED_BY(&mu_); + std::vector unmatched_requests_ ABSL_GUARDED_BY(&mu_); +}; // Subclass of TestServiceImpl that increments a request counter for // every call to the Echo Rpc. @@ -179,12 +265,7 @@ class RlsEnd2endTest : public ::testing::Test { grpc_core::LocalhostResolves(&localhost_resolves_to_ipv4, &localhost_resolves_to_ipv6); ipv6_only_ = !localhost_resolves_to_ipv4 && localhost_resolves_to_ipv6; - rls_server_ = absl::make_unique>( - "rls", [](grpc::ServerContext* ctx) { - EXPECT_THAT(ctx->client_metadata(), - ::testing::Contains( - ::testing::Pair(kCallCredsMdKey, kCallCredsMdValue))); - }); + rls_server_ = absl::make_unique>("rls"); rls_server_->Start(); resolver_response_generator_ = absl::make_unique(); @@ -235,6 +316,26 @@ class RlsEnd2endTest : public ::testing::Test { return absl::StrCat("ipv4:127.0.0.1:", port); } + static RouteLookupRequest BuildRlsRequest( + std::map key, + RouteLookupRequest::Reason reason = RouteLookupRequest::REASON_MISS, + const char* stale_header_data = "") { + RouteLookupRequest request; + request.set_target_type("grpc"); + request.mutable_key_map()->insert(key.begin(), key.end()); + request.set_reason(reason); + request.set_stale_header_data(stale_header_data); + return request; + } + + static RouteLookupResponse BuildRlsResponse(std::vector targets, + const char* header_data = "") { + RouteLookupResponse response; + response.mutable_targets()->Add(targets.begin(), targets.end()); + response.set_header_data(header_data); + return response; + } + struct RpcOptions { int timeout_ms = 1000; bool wait_for_ready = false; @@ -380,7 +481,7 @@ class RlsEnd2endTest : public ::testing::Test { return absl::StrCat( "{" " \"loadBalancingConfig\":[{" - " \"rls_experimental\":{", + " \"rls\":{", absl::StrJoin(rls_config_parts, ","), " }" " }]" diff --git a/test/cpp/end2end/rls_server.cc b/test/cpp/end2end/rls_server.cc deleted file mode 100644 index c5053792cc4..00000000000 --- a/test/cpp/end2end/rls_server.cc +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright 2020 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "test/cpp/end2end/rls_server.h" - -#include - -#include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" -#include "src/proto/grpc/lookup/v1/rls.pb.h" -#include "test/core/util/test_config.h" - -using ::grpc::lookup::v1::RouteLookupRequest; -using ::grpc::lookup::v1::RouteLookupResponse; - -namespace grpc { -namespace testing { - -::grpc::Status RlsServiceImpl::RouteLookup(grpc::ServerContext* context, - const RouteLookupRequest* request, - RouteLookupResponse* response) { - gpr_log(GPR_INFO, "RLS: Received request: %s", - request->DebugString().c_str()); - if (context_proc_ != nullptr) { - context_proc_(context); - } - IncreaseRequestCount(); - EXPECT_EQ(request->target_type(), "grpc"); - // See if we have a configured response for this request. - ResponseData res; - { - grpc::internal::MutexLock lock(&mu_); - auto it = responses_.find(*request); - if (it == responses_.end()) { - gpr_log(GPR_INFO, "RLS: no matching request, returning INTERNAL"); - unmatched_requests_.push_back(*request); - return Status(StatusCode::INTERNAL, "no response entry"); - } - res = it->second; - } - // Configured response found, so use it. - if (res.response_delay > grpc_core::Duration::Zero()) { - gpr_sleep_until( - grpc_timeout_milliseconds_to_deadline(res.response_delay.millis())); - } - IncreaseResponseCount(); - *response = res.response; - gpr_log(GPR_INFO, "RLS: returning configured response: %s", - response->DebugString().c_str()); - return Status::OK; -} - -void RlsServiceImpl::SetResponse(RouteLookupRequest request, - RouteLookupResponse response, - grpc_core::Duration response_delay) { - grpc::internal::MutexLock lock(&mu_); - responses_[std::move(request)] = {std::move(response), response_delay}; -} - -void RlsServiceImpl::RemoveResponse(const RouteLookupRequest& request) { - grpc::internal::MutexLock lock(&mu_); - responses_.erase(request); -} - -std::vector RlsServiceImpl::GetUnmatchedRequests() { - grpc::internal::MutexLock lock(&mu_); - return std::move(unmatched_requests_); -} - -grpc::lookup::v1::RouteLookupRequest BuildRlsRequest( - std::map key, - grpc::lookup::v1::RouteLookupRequest::Reason reason, - const char* stale_header_data) { - grpc::lookup::v1::RouteLookupRequest request; - request.set_target_type("grpc"); - request.mutable_key_map()->insert(key.begin(), key.end()); - request.set_reason(reason); - request.set_stale_header_data(stale_header_data); - return request; -} - -grpc::lookup::v1::RouteLookupResponse BuildRlsResponse( - std::vector targets, const char* header_data) { - grpc::lookup::v1::RouteLookupResponse response; - response.mutable_targets()->Add(targets.begin(), targets.end()); - response.set_header_data(header_data); - return response; -} - -} // namespace testing -} // namespace grpc diff --git a/test/cpp/end2end/rls_server.h b/test/cpp/end2end/rls_server.h deleted file mode 100644 index 958d19676e3..00000000000 --- a/test/cpp/end2end/rls_server.h +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright 2020 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "absl/types/optional.h" - -#include "src/core/lib/gprpp/time.h" -#include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" -#include "src/proto/grpc/lookup/v1/rls.pb.h" -#include "test/cpp/end2end/counted_service.h" - -namespace grpc { -namespace testing { - -using RlsService = - CountedService; - -class RlsServiceImpl : public RlsService { - public: - using ContextProcessingFunc = std::function; - - explicit RlsServiceImpl(ContextProcessingFunc context_proc = nullptr) - : context_proc_(std::move(context_proc)) {} - - grpc::Status RouteLookup( - grpc::ServerContext* context, - const grpc::lookup::v1::RouteLookupRequest* request, - grpc::lookup::v1::RouteLookupResponse* response) override; - - void Start() {} - - void Shutdown() {} - - void SetResponse(grpc::lookup::v1::RouteLookupRequest request, - grpc::lookup::v1::RouteLookupResponse response, - grpc_core::Duration response_delay = grpc_core::Duration()); - - void RemoveResponse(const grpc::lookup::v1::RouteLookupRequest& request); - - std::vector GetUnmatchedRequests(); - - private: - // Sorting thunk for RouteLookupRequest. - struct RlsRequestLessThan { - bool operator()(const grpc::lookup::v1::RouteLookupRequest& req1, - const grpc::lookup::v1::RouteLookupRequest& req2) const { - std::map key_map1( - req1.key_map().begin(), req1.key_map().end()); - std::map key_map2( - req2.key_map().begin(), req2.key_map().end()); - if (key_map1 < key_map2) return true; - if (req1.reason() < req2.reason()) return true; - if (req1.stale_header_data() < req2.stale_header_data()) return true; - return false; - } - }; - - struct ResponseData { - grpc::lookup::v1::RouteLookupResponse response; - grpc_core::Duration response_delay; - }; - - ContextProcessingFunc context_proc_; - grpc::internal::Mutex mu_; - std::map - responses_ ABSL_GUARDED_BY(&mu_); - std::vector unmatched_requests_ - ABSL_GUARDED_BY(&mu_); -}; - -grpc::lookup::v1::RouteLookupRequest BuildRlsRequest( - std::map key, - grpc::lookup::v1::RouteLookupRequest::Reason reason = - grpc::lookup::v1::RouteLookupRequest::REASON_MISS, - const char* stale_header_data = ""); - -grpc::lookup::v1::RouteLookupResponse BuildRlsResponse( - std::vector targets, const char* header_data = ""); - -} // namespace testing -} // namespace grpc diff --git a/test/cpp/end2end/xds/BUILD b/test/cpp/end2end/xds/BUILD index 4a69b5c8953..19c53146c08 100644 --- a/test/cpp/end2end/xds/BUILD +++ b/test/cpp/end2end/xds/BUILD @@ -77,8 +77,6 @@ grpc_cc_test( "//:grpc++", "//:grpc_resolver_fake", "//:grpcpp_csds", - "//src/proto/grpc/lookup/v1:rls_config_proto", - "//src/proto/grpc/lookup/v1:rls_proto", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -98,7 +96,6 @@ grpc_cc_test( "//src/proto/grpc/testing/xds/v3:tls_proto", "//test/core/util:grpc_test_util", "//test/cpp/end2end:counted_service", - "//test/cpp/end2end:rls_server", "//test/cpp/end2end:test_service_impl", "//test/cpp/util:test_config", "//test/cpp/util:test_util", diff --git a/test/cpp/end2end/xds/xds_end2end_test.cc b/test/cpp/end2end/xds/xds_end2end_test.cc index ccbcf3735bc..af7e9d8d216 100644 --- a/test/cpp/end2end/xds/xds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_end2end_test.cc @@ -80,9 +80,6 @@ #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" -#include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" -#include "src/proto/grpc/lookup/v1/rls.pb.h" -#include "src/proto/grpc/lookup/v1/rls_config.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/xds/ads_for_test.grpc.pb.h" #include "src/proto/grpc/testing/xds/cds_for_test.grpc.pb.h" @@ -106,7 +103,6 @@ #include "test/core/util/resolve_localhost_ip46.h" #include "test/core/util/test_config.h" #include "test/cpp/end2end/counted_service.h" -#include "test/cpp/end2end/rls_server.h" #include "test/cpp/end2end/test_service_impl.h" #include "test/cpp/end2end/xds/xds_server.h" #include "test/cpp/util/test_config.h" @@ -157,9 +153,6 @@ using ClientStats = LrsServiceImpl::ClientStats; using ::grpc::experimental::ExternalCertificateVerifier; using ::grpc::experimental::IdentityKeyCertPair; using ::grpc::experimental::StaticDataCertificateProvider; -using ::grpc::lookup::v1::RouteLookupClusterSpecifier; -using ::grpc::lookup::v1::RouteLookupConfig; -using ::grpc::lookup::v1::RouteLookupRequest; constexpr char kDefaultLocalityRegion[] = "xds_default_locality_region"; constexpr char kDefaultLocalityZone[] = "xds_default_locality_zone"; @@ -184,18 +177,6 @@ constexpr char kClientKeyPath[] = "src/core/tsi/test_creds/client.key"; constexpr char kBadClientCertPath[] = "src/core/tsi/test_creds/badclient.pem"; constexpr char kBadClientKeyPath[] = "src/core/tsi/test_creds/badclient.key"; -constexpr char kRlsTestKey[] = "test_key"; -constexpr char kRlsTestKey1[] = "key1"; -constexpr char kRlsTestValue[] = "test_value"; -constexpr char kRlsHostKey[] = "host_key"; -constexpr char kRlsServiceKey[] = "service_key"; -constexpr char kRlsServiceValue[] = "grpc.testing.EchoTestService"; -constexpr char kRlsMethodKey[] = "method_key"; -constexpr char kRlsMethodValue[] = "Echo"; -constexpr char kRlsConstantKey[] = "constant_key"; -constexpr char kRlsConstantValue[] = "constant_value"; -constexpr char kRlsClusterSpecifierPluginInstanceName[] = "rls_plugin_instance"; - template class BackendServiceImpl : public CountedService> { @@ -7512,302 +7493,6 @@ TEST_P(CdsTest, RingHashPolicyHasInvalidRingSizeMinGreaterThanMax) { "min_ring_size cannot be greater than max_ring_size.")); } -class RlsTest : public XdsEnd2endTest { - protected: - class RlsServerThread : public ServerThread { - public: - explicit RlsServerThread(XdsEnd2endTest* test_obj) - : ServerThread(test_obj, /*use_xds_enabled_server=*/false), - rls_service_(new RlsServiceImpl()) {} - - RlsServiceImpl* rls_service() { return rls_service_.get(); } - - private: - void RegisterAllServices(ServerBuilder* builder) override { - builder->RegisterService(rls_service_.get()); - } - - void StartAllServices() override { rls_service_->Start(); } - - void ShutdownAllServices() override { rls_service_->Shutdown(); } - - const char* Type() override { return "Rls"; } - - std::shared_ptr rls_service_; - }; - - RlsTest() : XdsEnd2endTest(4) { - rls_server_ = absl::make_unique(this); - rls_server_->Start(); - } - - void SetUp() override { - XdsEnd2endTest::SetUp(); - StartAllBackends(); - } - - void TearDown() override { - rls_server_->Shutdown(); - XdsEnd2endTest::TearDown(); - } - - std::unique_ptr rls_server_; -}; - -TEST_P(RlsTest, XdsRoutingClusterSpecifierPlugin) { - gpr_setenv("GRPC_EXPERIMENTAL_XDS_RLS_LB", "true"); - const char* kNewClusterName = "new_cluster"; - const char* kNewEdsServiceName = "new_eds_service_name"; - const size_t kNumEchoRpcs = 5; - // Populate new EDS resources. - EdsResourceArgs args({ - {"locality0", CreateEndpointsForBackends(0, 1)}, - }); - EdsResourceArgs args1({ - {"locality0", CreateEndpointsForBackends(1, 2)}, - }); - balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - balancer_->ads_service()->SetEdsResource( - BuildEdsResource(args1, kNewEdsServiceName)); - // Populate new CDS resources. - Cluster new_cluster = default_cluster_; - new_cluster.set_name(kNewClusterName); - new_cluster.mutable_eds_cluster_config()->set_service_name( - kNewEdsServiceName); - balancer_->ads_service()->SetCdsResource(new_cluster); - // Prepare the RLSLookupConfig and configure all the keys; change route - // configurations to use cluster specifier plugin. - rls_server_->rls_service()->SetResponse( - BuildRlsRequest({{kRlsTestKey, kRlsTestValue}, - {kRlsHostKey, kServerName}, - {kRlsServiceKey, kRlsServiceValue}, - {kRlsMethodKey, kRlsMethodValue}, - {kRlsConstantKey, kRlsConstantValue}}), - BuildRlsResponse({kNewClusterName})); - RouteLookupConfig route_lookup_config; - auto* key_builder = route_lookup_config.add_grpc_keybuilders(); - auto* name = key_builder->add_names(); - name->set_service(kRlsServiceValue); - name->set_method(kRlsMethodValue); - auto* header = key_builder->add_headers(); - header->set_key(kRlsTestKey); - header->add_names(kRlsTestKey1); - header->add_names("key2"); - auto* extra_keys = key_builder->mutable_extra_keys(); - extra_keys->set_host(kRlsHostKey); - extra_keys->set_service(kRlsServiceKey); - extra_keys->set_method(kRlsMethodKey); - (*key_builder->mutable_constant_keys())[kRlsConstantKey] = kRlsConstantValue; - route_lookup_config.set_lookup_service( - absl::StrCat("localhost:", rls_server_->port())); - route_lookup_config.set_cache_size_bytes(5000); - RouteLookupClusterSpecifier rls; - *rls.mutable_route_lookup_config() = std::move(route_lookup_config); - RouteConfiguration new_route_config = default_route_config_; - auto* plugin = new_route_config.add_cluster_specifier_plugins(); - plugin->mutable_extension()->set_name(kRlsClusterSpecifierPluginInstanceName); - plugin->mutable_extension()->mutable_typed_config()->PackFrom(rls); - auto* default_route = - new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); - default_route->mutable_route()->set_cluster_specifier_plugin( - kRlsClusterSpecifierPluginInstanceName); - SetRouteConfiguration(balancer_.get(), new_route_config); - auto rpc_options = RpcOptions().set_metadata({{kRlsTestKey1, kRlsTestValue}}); - WaitForAllBackends(1, 2, WaitForBackendOptions(), rpc_options); - CheckRpcSendOk(kNumEchoRpcs, rpc_options); - // Make sure RPCs all go to the correct backend. - EXPECT_EQ(kNumEchoRpcs, backends_[1]->backend_service()->request_count()); - gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_XDS_RLS_LB"); -} - -TEST_P(RlsTest, XdsRoutingClusterSpecifierPluginNacksUndefinedSpecifier) { - gpr_setenv("GRPC_EXPERIMENTAL_XDS_RLS_LB", "true"); - const char* kNewClusterName = "new_cluster"; - const char* kNewEdsServiceName = "new_eds_service_name"; - // Populate new EDS resources. - EdsResourceArgs args({ - {"locality0", CreateEndpointsForBackends(0, 1)}, - }); - EdsResourceArgs args1({ - {"locality0", CreateEndpointsForBackends(1, 2)}, - }); - balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - balancer_->ads_service()->SetEdsResource( - BuildEdsResource(args1, kNewEdsServiceName)); - // Populate new CDS resources. - Cluster new_cluster = default_cluster_; - new_cluster.set_name(kNewClusterName); - new_cluster.mutable_eds_cluster_config()->set_service_name( - kNewEdsServiceName); - balancer_->ads_service()->SetCdsResource(new_cluster); - RouteConfiguration new_route_config = default_route_config_; - auto* default_route = - new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); - // Set Cluster Specifier Plugin to something that does not exist. - default_route->mutable_route()->set_cluster_specifier_plugin( - kRlsClusterSpecifierPluginInstanceName); - SetRouteConfiguration(balancer_.get(), new_route_config); - const auto response_state = WaitForRdsNack(); - ASSERT_TRUE(response_state.has_value()) << "timed out waiting for NACK"; - EXPECT_THAT(response_state->error_message, - ::testing::HasSubstr("RouteAction cluster contains cluster " - "specifier plugin name not configured.")); - gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_XDS_RLS_LB"); -} - -TEST_P(RlsTest, XdsRoutingClusterSpecifierPluginNacksUnknownSpecifierProto) { - // TODO(donnadionne): Doug is working on adding a new is_optional field to - // ClusterSpecifierPlugin in envoyproxy/envoy#20301. Once that goes in, the - // behavior we want in this case is that if is_optional is true, then we - // ignore that plugin and ignore any routes that refer to that plugin. - // However, if is_optional is false, then we want to NACK. - gpr_setenv("GRPC_EXPERIMENTAL_XDS_RLS_LB", "true"); - const char* kNewClusterName = "new_cluster"; - const char* kNewEdsServiceName = "new_eds_service_name"; - // Populate new EDS resources. - EdsResourceArgs args({ - {"locality0", CreateEndpointsForBackends(0, 1)}, - }); - EdsResourceArgs args1({ - {"locality0", CreateEndpointsForBackends(1, 2)}, - }); - balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - balancer_->ads_service()->SetEdsResource( - BuildEdsResource(args1, kNewEdsServiceName)); - // Populate new CDS resources. - Cluster new_cluster = default_cluster_; - new_cluster.set_name(kNewClusterName); - new_cluster.mutable_eds_cluster_config()->set_service_name( - kNewEdsServiceName); - balancer_->ads_service()->SetCdsResource(new_cluster); - // Prepare the RLSLookupConfig: change route configurations to use cluster - // specifier plugin. - RouteLookupConfig route_lookup_config; - RouteConfiguration new_route_config = default_route_config_; - auto* plugin = new_route_config.add_cluster_specifier_plugins(); - plugin->mutable_extension()->set_name(kRlsClusterSpecifierPluginInstanceName); - // Instead of grpc.lookup.v1.RouteLookupClusterSpecifier, let's say we - // mistakenly packed the inner RouteLookupConfig instead. - plugin->mutable_extension()->mutable_typed_config()->PackFrom( - route_lookup_config); - auto* default_route = - new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); - default_route->mutable_route()->set_cluster_specifier_plugin( - kRlsClusterSpecifierPluginInstanceName); - SetRouteConfiguration(balancer_.get(), new_route_config); - const auto response_state = WaitForRdsNack(); - ASSERT_TRUE(response_state.has_value()) << "timed out waiting for NACK"; - EXPECT_THAT( - response_state->error_message, - ::testing::HasSubstr( - "Unable to locate the cluster specifier plugin in the registry")); - gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_XDS_RLS_LB"); -} - -TEST_P(RlsTest, XdsRoutingRlsClusterSpecifierPluginNacksRequiredMatch) { - gpr_setenv("GRPC_EXPERIMENTAL_XDS_RLS_LB", "true"); - const char* kNewClusterName = "new_cluster"; - const char* kNewEdsServiceName = "new_eds_service_name"; - // Populate new EDS resources. - EdsResourceArgs args({ - {"locality0", CreateEndpointsForBackends(0, 1)}, - }); - EdsResourceArgs args1({ - {"locality0", CreateEndpointsForBackends(1, 2)}, - }); - balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - balancer_->ads_service()->SetEdsResource( - BuildEdsResource(args1, kNewEdsServiceName)); - // Populate new CDS resources. - Cluster new_cluster = default_cluster_; - new_cluster.set_name(kNewClusterName); - new_cluster.mutable_eds_cluster_config()->set_service_name( - kNewEdsServiceName); - balancer_->ads_service()->SetCdsResource(new_cluster); - // Prepare the RLSLookupConfig and configure all the keys; add required_match - // field which should not be there. - RouteLookupConfig route_lookup_config; - auto* key_builder = route_lookup_config.add_grpc_keybuilders(); - auto* name = key_builder->add_names(); - name->set_service(kRlsServiceValue); - name->set_method(kRlsMethodValue); - auto* header = key_builder->add_headers(); - header->set_key(kRlsTestKey); - header->add_names(kRlsTestKey1); - header->set_required_match(true); - route_lookup_config.set_lookup_service( - absl::StrCat("localhost:", rls_server_->port())); - route_lookup_config.set_cache_size_bytes(5000); - RouteLookupClusterSpecifier rls; - *rls.mutable_route_lookup_config() = std::move(route_lookup_config); - RouteConfiguration new_route_config = default_route_config_; - auto* plugin = new_route_config.add_cluster_specifier_plugins(); - plugin->mutable_extension()->set_name(kRlsClusterSpecifierPluginInstanceName); - plugin->mutable_extension()->mutable_typed_config()->PackFrom(rls); - auto* default_route = - new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); - default_route->mutable_route()->set_cluster_specifier_plugin( - kRlsClusterSpecifierPluginInstanceName); - SetRouteConfiguration(balancer_.get(), new_route_config); - const auto response_state = WaitForRdsNack(); - ASSERT_TRUE(response_state.has_value()) << "timed out waiting for NACK"; - EXPECT_THAT( - response_state->error_message, - ::testing::HasSubstr("field:requiredMatch error:must not be present")); - gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_XDS_RLS_LB"); -} - -TEST_P(RlsTest, XdsRoutingClusterSpecifierPluginDisabled) { - const char* kNewClusterName = "new_cluster"; - const char* kNewEdsServiceName = "new_eds_service_name"; - // Populate new EDS resources. - EdsResourceArgs args({ - {"locality0", CreateEndpointsForBackends(0, 1)}, - }); - EdsResourceArgs args1({ - {"locality0", CreateEndpointsForBackends(1, 2)}, - }); - balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - balancer_->ads_service()->SetEdsResource( - BuildEdsResource(args1, kNewEdsServiceName)); - // Populate new CDS resources. - Cluster new_cluster = default_cluster_; - new_cluster.set_name(kNewClusterName); - new_cluster.mutable_eds_cluster_config()->set_service_name( - kNewEdsServiceName); - balancer_->ads_service()->SetCdsResource(new_cluster); - // Prepare the RLSLookupConfig and configure all the keys; change route - // configurations to use cluster specifier plugin. - RouteLookupConfig route_lookup_config; - auto* key_builder = route_lookup_config.add_grpc_keybuilders(); - auto* name = key_builder->add_names(); - name->set_service(kRlsServiceValue); - name->set_method(kRlsMethodValue); - auto* header = key_builder->add_headers(); - header->set_key(kRlsTestKey); - header->add_names(kRlsTestKey1); - route_lookup_config.set_lookup_service( - absl::StrCat("localhost:", rls_server_->port())); - route_lookup_config.set_cache_size_bytes(5000); - RouteLookupClusterSpecifier rls; - *rls.mutable_route_lookup_config() = std::move(route_lookup_config); - RouteConfiguration new_route_config = default_route_config_; - auto* plugin = new_route_config.add_cluster_specifier_plugins(); - plugin->mutable_extension()->set_name(kRlsClusterSpecifierPluginInstanceName); - plugin->mutable_extension()->mutable_typed_config()->PackFrom(rls); - auto* route = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); - route->mutable_route()->set_cluster_specifier_plugin( - kRlsClusterSpecifierPluginInstanceName); - auto* default_route = new_route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultClusterName); - SetRouteConfiguration(balancer_.get(), new_route_config); - // Ensure we ignore the cluster specifier plugin and send traffic according to - // the default route. - auto rpc_options = RpcOptions().set_metadata({{kRlsTestKey1, kRlsTestValue}}); - WaitForAllBackends(0, 1, WaitForBackendOptions(), rpc_options); -} - class XdsSecurityTest : public BasicTest { protected: void SetUp() override { @@ -13780,14 +13465,6 @@ INSTANTIATE_TEST_SUITE_P( TestType().set_enable_rds_testing().set_use_v2()), &TestTypeName); -// Rls tests depend on XdsResolver. -INSTANTIATE_TEST_SUITE_P( - XdsTest, RlsTest, - ::testing::Values(TestType(), TestType().set_enable_rds_testing(), - // Also test with xDS v2. - TestType().set_enable_rds_testing().set_use_v2()), - &TestTypeName); - // CDS depends on XdsResolver. INSTANTIATE_TEST_SUITE_P( XdsTest, CdsTest, diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 61bb989f88c..1625b8c33de 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1510,8 +1510,6 @@ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h \ -src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c \ -src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.h \ src/core/ext/upb-generated/udpa/annotations/security.upb.c \ @@ -1780,8 +1778,6 @@ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c \ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h \ -src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c \ -src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h \ src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c \ @@ -1849,8 +1845,6 @@ src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_client_stats.h \ src/core/ext/xds/xds_cluster.cc \ src/core/ext/xds/xds_cluster.h \ -src/core/ext/xds/xds_cluster_specifier_plugin.cc \ -src/core/ext/xds/xds_cluster_specifier_plugin.h \ src/core/ext/xds/xds_common_types.cc \ src/core/ext/xds/xds_common_types.h \ src/core/ext/xds/xds_endpoint.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e0964b3c0c0..ec96d23da06 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1300,8 +1300,6 @@ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h \ -src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.c \ -src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls_config.upb.h \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.h \ src/core/ext/upb-generated/udpa/annotations/security.upb.c \ @@ -1570,8 +1568,6 @@ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c \ src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.c \ src/core/ext/upbdefs-generated/opencensus/proto/trace/v1/trace_config.upbdefs.h \ -src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.c \ -src/core/ext/upbdefs-generated/src/proto/grpc/lookup/v1/rls_config.upbdefs.h \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h \ src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c \ @@ -1639,8 +1635,6 @@ src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_client_stats.h \ src/core/ext/xds/xds_cluster.cc \ src/core/ext/xds/xds_cluster.h \ -src/core/ext/xds/xds_cluster_specifier_plugin.cc \ -src/core/ext/xds/xds_cluster_specifier_plugin.h \ src/core/ext/xds/xds_common_types.cc \ src/core/ext/xds/xds_common_types.h \ src/core/ext/xds/xds_endpoint.cc \